From 0bd480822ed1ca9c907c3ac2feb9c44b83cddd1b Mon Sep 17 00:00:00 2001 From: Sebastien Flory Date: Fri, 20 Sep 2024 19:29:10 +0200 Subject: [PATCH] Add log to see notion headers in case of rate limit --- connectors/src/connectors/notion/lib/notion_api.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/connectors/src/connectors/notion/lib/notion_api.ts b/connectors/src/connectors/notion/lib/notion_api.ts index 42b5181b0fbf..62eca76e4927 100644 --- a/connectors/src/connectors/notion/lib/notion_api.ts +++ b/connectors/src/connectors/notion/lib/notion_api.ts @@ -393,6 +393,11 @@ export async function isAccessibleAndUnarchived( waitTime = retryAfter * 1000; usingHeader = true; } + } else { + tryLogger.warn( + { headers: e.headers }, + "Retry-After header not found." + ); } } catch (e) { // Ignore all errors here as the e.headers type is unknown.