Skip to content

Commit

Permalink
Fix: notion stuck trying to operate on a page no longer in our db (#9354
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Fraggle authored Dec 13, 2024
1 parent 7fb74f4 commit 7b80cb4
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion connectors/src/connectors/notion/temporal/activities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1354,7 +1354,16 @@ export async function cacheBlockChildren({
},
});

if (notionPageModel?.skipReason) {
if (!notionPageModel) {
logger.info("Skipping page not found in db.");
return {
nextCursor: null,
blocksWithChildren: [],
blocksCount: 0,
};
}

if (notionPageModel.skipReason) {
logger.info(
{ skipReason: notionPageModel.skipReason },
"Skipping page with skip reason"
Expand Down

0 comments on commit 7b80cb4

Please sign in to comment.