Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions apps/web/app/api/google/webhook/process-history.ts
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,14 @@ async function fetchGmailHistoryResilient({
historyTypes: ["messageAdded", "labelAdded", "labelRemoved"],
maxResults: 500,
});

if (data.nextPageToken) {
logger.warn("Gmail history has more pages that were not fetched", {
historyItemCount: data.history?.length ?? 0,
startHistoryId,
});
}

return { status: "success", data, startHistoryId };
} catch (error) {
// Gmail history IDs are typically valid for ~1 week. If older, Gmail returns a 404.
Expand Down
Loading