mirror of
https://github.com/cpvalente/ontime.git
synced 2026-09-02 12:59:09 +00:00
catch getWorksheetNames
This commit is contained in:
@@ -76,8 +76,13 @@ export default function SourcesPanel() {
|
|||||||
setAuthenticationStatus(result.authenticated);
|
setAuthenticationStatus(result.authenticated);
|
||||||
setSheetId(result.sheetId);
|
setSheetId(result.sheetId);
|
||||||
if (result.authenticated === 'authenticated' && result.sheetId) {
|
if (result.authenticated === 'authenticated' && result.sheetId) {
|
||||||
const names = await getWorksheetNames(result.sheetId);
|
try {
|
||||||
setWorksheets(names);
|
const names = await getWorksheetNames(result.sheetId);
|
||||||
|
setWorksheets(names);
|
||||||
|
} catch (error) {
|
||||||
|
const message = maybeAxiosError(error);
|
||||||
|
setError(`Error getting worksheets: ${message}`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
setImportFlow('gsheet');
|
setImportFlow('gsheet');
|
||||||
|
|||||||
Reference in New Issue
Block a user