Skip to content

Commit 8d11d8f

Browse files
committed
more specific errors for 401 and 410 errors
1 parent 44e69e7 commit 8d11d8f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/js/core/ConfigFactory.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,10 @@ export async function readGoogleAsCSV(url, sheets_proxy) {
160160
}).catch(error_json => {
161161
if (error_json.proxy_err_code == 'response_not_csv') {
162162
throw new TLError('Timeline could not read the data for your timeline. Make sure you have published it to the web.')
163+
} else if (error_json.status_code == 401) {
164+
throw new TLError('Configuration unreadable. Please make sure your Google Sheets document is published to the web and review step 2 of the timeline setup instructions to make sure you have the correct URL, as this has changed.')
165+
} else if (error_json.status_code == 410) {
166+
throw new TLError('Google reports that this configuration spreadsheet is gone. Check to see if it has been deleted from Google Drive. Timeline configuration spreadsheets must not be deleted.')
163167
}
164168
let msg = "undefined error"
165169
if (Array.isArray(error_json.message)) {

0 commit comments

Comments
 (0)