Skip to content

Conversation

ricoberger
Copy link
Member

This commit improves the error handling in our Go API. To return an
error we can now directly call errresponse.Render, which sets the passed
in status and returns the message and error as an JSON object to the
user. This error will now also be logged in our custom request log
handler.

This commit improves the error handling in our Go API. To return an
error we can now directly call errresponse.Render, which sets the passed
in status and returns the message and error as an JSON object to the
user. This error will now also be logged in our custom request log
handler.
@ricoberger ricoberger force-pushed the improve-api-error-handling branch from 738b0e5 to 4246329 Compare July 15, 2021 20:11
@ricoberger ricoberger merged commit 41fe0f3 into main Jul 15, 2021
@ricoberger ricoberger deleted the improve-api-error-handling branch July 15, 2021 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant