CRITICAL: Async route handlers lack try/catch - unhandled rejections crash process #68
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#68
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
Multiple async route handlers across the codebase lack try/catch blocks. On Express 4 (which this project uses), unhandled promise rejections from await calls will crash the Node.js process rather than being caught by Express error middleware.
Affected Routes
Most critical (auth routes with bcrypt calls):
Additional async routes without try/catch:
Impact
If bcrypt.compare(), hashPassword(), or any DB operation throws an unexpected error in these handlers, the unhandled rejection will terminate the server process. No process.on(unhandledRejection) handler exists either.
Recommended Fix
v0.34.2.1 closed