HIGH: No process-level unhandledRejection/uncaughtException handler #73
Labels
No Label
architecture
backend
bug
feature
frontend
priority:critical
priority:high
priority:low
priority:medium
priority:nice-to-have
ux
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: null/BillTracker#73
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug Description
server.js has no process.on(unhandledRejection) or process.on(uncaughtException) handlers. Combined with the async routes lacking try/catch (see #68), any unhandled promise rejection from Express 4 async handlers will crash the process with no structured error reporting.
The only process exit points are in the main() catch block for startup failures.
Affected Files
Impact
Silent process crashes in production with no structured logging. Difficult to diagnose recurring crashes.
Recommended Fix
Add:
process.on(unhandledRejection, (reason, promise) => { logger/error tracking });
process.on(uncaughtException, (err) => { logger/error tracking; graceful shutdown });
close v0.34.2.1 (line 155)