Skip to content

Commit

Permalink
fix: treat notion 'validation_error' as unreachable (#2146)
Browse files Browse the repository at this point in the history
  • Loading branch information
fontanierh authored Oct 17, 2023
1 parent b557223 commit 1a444e1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion connectors/src/connectors/notion/lib/notion_api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,13 @@ export async function isAccessibleAndUnarchived(
}
continue;
}
if (NOTION_UNAUTHORIZED_ACCESS_ERROR_CODES.includes(e.code)) {
if (
NOTION_UNAUTHORIZED_ACCESS_ERROR_CODES.includes(e.code) ||
// This happens if the database is a "linked" database - we can't query those so
// it's not useful to retry. We just assume that we don't have access to this resource
// and return false.
e.code === "validation_error"
) {
return false;
}
}
Expand Down

0 comments on commit 1a444e1

Please sign in to comment.