Provide more context upon 500 errors #20

Closed
opened 2022-07-05 01:38:39 +02:00 by blacklight · 0 comments
Owner

As of now we don't provide much context upon API internal server errors. This fix aims to do the following:

  • Catch any uncaught exception in endpoints (AssertErrors are already mapped to 400) so we don't bubble it up in the call stack
  • Properly log the exception
  • Return a 500 error with a description of the error instead of a generic Internal server error
As of now we don't provide much context upon API internal server errors. This fix aims to do the following: - Catch any uncaught exception in endpoints (`AssertError`s are already mapped to 400) so we don't bubble it up in the call stack - Properly log the exception - Return a 500 error with a description of the error instead of a generic `Internal server error`
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: platypush/platypush#20
No description provided.