Skip to content

Commit

Permalink
notion: give up on repeated validation_error in search (#3386)
Browse files Browse the repository at this point in the history
  • Loading branch information
spolu authored Jan 23, 2024
1 parent b6aed09 commit bf47395
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion connectors/src/connectors/notion/temporal/activities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ export async function getPagesAndDatabasesToSync({
// Notion workspaces are resynced daily so nothing is lost forever.
switch (e.code) {
case "internal_server_error":
case "validation_error":
if (Context.current().info.attempt > 20) {
localLogger.error(
{
Expand All @@ -299,7 +300,7 @@ export async function getPagesAndDatabasesToSync({
nextCursor: null,
};
}
break;
throw e;

case "unauthorized":
throw new ExternalOauthTokenError(e);
Expand Down

0 comments on commit bf47395

Please sign in to comment.