Skip to content

Commit

Permalink
fix(sheets): display more expressive error message on entity not foun…
Browse files Browse the repository at this point in the history
…d error
  • Loading branch information
hundekoerper committed Sep 26, 2019
1 parent fa62afa commit 50ccc6e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions server-src/drive/get-archive-index-sheet.ts
Expand Up @@ -104,6 +104,14 @@ async function getFirstSheetWorker(

return sheetId;
} catch (error) {
if (error.response.data.error.code === 404) {
throw new Error(
`The file "${DRIVE_ARCHIVE_INDEX_SHEET}" was created by a deprecated ` +
`version of the exporter. Please rename or remove it to allow the ` +
`application to create a new one.`
);
}

throw error;
}
}
Expand Down

0 comments on commit 50ccc6e

Please sign in to comment.