serve static assets from local public/ instead of static.officer.dev, simplify gmail history 404/410 handling
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -142,13 +142,8 @@ async function getHistoryChanges(
|
||||
|
||||
const res = await gmailApiFetch(accessToken, '/history', params);
|
||||
|
||||
if (res.status === 404) {
|
||||
// No history — nothing new
|
||||
return { messageIds: [], historyId: latestHistoryId };
|
||||
}
|
||||
|
||||
if (res.status === 410) {
|
||||
// historyId too old — caller should fall back to date-based listing
|
||||
if (res.status === 404 || res.status === 410) {
|
||||
// historyId too old or invalid — caller should fall back to date-based listing
|
||||
throw new HistoryExpiredError();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user