fix(add-gmail): graceful startup when credentials missing + poll backoff
- connect() warns and returns instead of throwing when ~/.gmail-mcp/ credentials are missing, preventing app crash - index.ts wraps gmail.connect() in try/catch as a safety net - Poll loop uses exponential backoff on consecutive errors (caps at 30m) instead of hammering the Gmail API every 60s on auth failures - Switch from setInterval to setTimeout chain for proper backoff timing Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -452,7 +452,11 @@ async function main(): Promise<void> {
|
||||
|
||||
const gmail = new GmailChannel(channelOpts);
|
||||
channels.push(gmail);
|
||||
await gmail.connect();
|
||||
try {
|
||||
await gmail.connect();
|
||||
} catch (err) {
|
||||
logger.warn({ err }, 'Gmail channel failed to connect, continuing without it');
|
||||
}
|
||||
|
||||
// Start subsystems (independently of connection handler)
|
||||
startSchedulerLoop({
|
||||
|
||||
Reference in New Issue
Block a user