From 5881e78fe147a4ac7c685485a18ab316b0584ad8 Mon Sep 17 00:00:00 2001 From: Sebastien Flory Date: Fri, 13 Dec 2024 11:44:39 +0100 Subject: [PATCH] Fix: when 404 on a Gdrive spreadsheet, just continue (#9352) --- .../connectors/google_drive/temporal/spreadsheets.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/connectors/src/connectors/google_drive/temporal/spreadsheets.ts b/connectors/src/connectors/google_drive/temporal/spreadsheets.ts index 4032ac6cdb6e..3906de2fecd0 100644 --- a/connectors/src/connectors/google_drive/temporal/spreadsheets.ts +++ b/connectors/src/connectors/google_drive/temporal/spreadsheets.ts @@ -458,6 +458,17 @@ export async function syncSpreadSheet( // Allow to locally retry the API call. continue; } + } else if ( + err instanceof Error && + "code" in err && + err.code === 404 + ) { + localLogger.info( + "[Spreadsheet] Consistently getting 404 Not Found from Google Sheets, skipping further processing." + ); + return { + isSupported: false, + }; } throw err;