Problem
When GeminiAgent.initialize() rejects (e.g. missing Google OAuth credentials), the bootstrap promise stored in this.bootstrap has no immediate rejection handler. This causes an unhandledRejection event that propagates from the worker to the renderer, resulting in Sentry error ELECTRON-5B (76 occurrences, still active on v1.9.1).
Sentry issue: ELECTRON-5B
Root Cause
Both GeminiAgent and GeminiAgentManager store a deferred bootstrap promise in their constructors without attaching a rejection handler. The error is only caught when send() / sendMessage() later awaits the promise, but by then Node.js has already flagged it as unhandled.
Fix
Attach a no-op .catch(() => {}) to the bootstrap promise in both constructors. This marks the rejection as "handled" for Node.js while still propagating the error when callers await the promise.
Problem
When
GeminiAgent.initialize()rejects (e.g. missing Google OAuth credentials), the bootstrap promise stored inthis.bootstraphas no immediate rejection handler. This causes anunhandledRejectionevent that propagates from the worker to the renderer, resulting in Sentry error ELECTRON-5B (76 occurrences, still active on v1.9.1).Sentry issue: ELECTRON-5B
Root Cause
Both
GeminiAgentandGeminiAgentManagerstore a deferred bootstrap promise in their constructors without attaching a rejection handler. The error is only caught whensend()/sendMessage()later awaits the promise, but by then Node.js has already flagged it as unhandled.Fix
Attach a no-op
.catch(() => {})to the bootstrap promise in both constructors. This marks the rejection as "handled" for Node.js while still propagating the error when callers await the promise.