Repository navigation
fix: keep key, params and status of app errors in error responses - #225
Merged
Merged
Conversation
Unexpected errors (e.g. Postgres errors) were returned as 'Could not serve: <error>', exposing table, column and constraint names. Errors with a key (ServerError, arena SystemError) are still sent with their key and params.
SteRiccio
marked this pull request as draft
October 29, 2026 21:24
Member
Author
|
Postponed: error details in the client are useful for now, to find the related log entry quickly when a user reports an error. |
SteRiccio
marked this pull request as ready for review
November 15, 2026 20:10
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Problem
Responses.sendError(used by the error middleware, so by every route that callsnext(error)) keptkey,paramsandstatusCodeonly for our ownServerError. Other app errors that carry akey, such as arena'sSystemError, were flattened to a generic error, so the client lost the specific message.Fix
key(ourServerError, and also arena'sSystemError) are sent with theirkey,paramsandstatusCode(500 if missing).appErrors.genericwithCould not serve: <error>, so users can see the details client side and share them when reporting a problem.Tests
Unit tests for
Responses.sendError: unexpected errors are sent as generic errors with their details; app errors keep key, params and status; unauthorized errors map to 403.