mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-20 14:39:06 +00:00
refactor: reword error
This commit is contained in:
committed by
Carlos Valente
parent
fd9b944ecf
commit
649f0af2cf
@@ -215,9 +215,7 @@ async function verifySheet(
|
|||||||
error.errors[0].reason === 'failedPrecondition' &&
|
error.errors[0].reason === 'failedPrecondition' &&
|
||||||
error.errors[0].message === 'This operation is not supported for this document'
|
error.errors[0].message === 'This operation is not supported for this document'
|
||||||
) {
|
) {
|
||||||
throw new Error(
|
throw new Error('Cannot read the linked file as a Google Sheet. It may be an .xlsx file instead.');
|
||||||
'This operation is not supported for this document. the reason is most likely that this is a .xlsx document',
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
const errorMessage = getErrorMessage(error);
|
const errorMessage = getErrorMessage(error);
|
||||||
throw new Error(`Failed to verify sheet: ${errorMessage}`);
|
throw new Error(`Failed to verify sheet: ${errorMessage}`);
|
||||||
|
|||||||
Reference in New Issue
Block a user