Merge branch 'dev'
CI/CD / deploy (push) Failing after 21m52s Details

This commit is contained in:
Jeff Emmett 2026-04-02 14:07:10 -07:00
commit c716723686
2 changed files with 16 additions and 0 deletions

View File

@ -1112,6 +1112,7 @@ routes.post("/api/personal-inboxes", async (c) => {
auth: { user: imap_user, pass: imap_pass },
logger: false,
});
client.on('error', () => {}); // swallow — validation only
await client.connect();
await client.logout();
} catch (e: any) {
@ -1454,6 +1455,9 @@ async function syncMailbox(mailbox: SyncableMailbox) {
tls: { rejectUnauthorized: IMAP_TLS_REJECT },
logger: false,
});
client.on('error', (err: Error) => {
console.error(`[Inbox] IMAP client error for ${mailbox.email}:`, err.message);
});
try {
await client.connect();
@ -1704,6 +1708,9 @@ async function syncAgentMailbox(creds: AgentImapCreds) {
tls: { rejectUnauthorized: IMAP_TLS_REJECT },
logger: false,
});
client.on('error', (err: Error) => {
console.error(`[Inbox] Agent IMAP client error (${creds.email}):`, err.message);
});
try {
await client.connect();

View File

@ -103,6 +103,15 @@ import { SystemClock } from "./clock-service";
import type { ClockPayload } from "./clock-service";
import { miRoutes } from "./mi-routes";
// ── Process-level error safety net (prevent crash on unhandled socket errors) ──
process.on('uncaughtException', (err) => {
console.error('[FATAL] Uncaught exception (swallowed):', err.message);
// Don't exit — keep the server running
});
process.on('unhandledRejection', (reason) => {
console.error('[FATAL] Unhandled rejection (swallowed):', reason);
});
// Register modules (order determines app-switcher menu position)
registerModule(canvasModule);
registerModule(pubsModule);