bug: Unhandled JSON.parse exception causes server crash #5
Reference in New Issue
Block a user
Delete Branch "%!s()"
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?
Description
In the profile update route,
JSON.parse()is called without a try-catch block. Malformed JSON input will throw an uncaught exception, crashing the request handler and potentially the server.Location
src/app/modules/profile/profile.route.tsHow to Fix
Wrap the JSON.parse in a try-catch block and pass errors to Express error handler:
Acceptance Criteria