lunakv / academyruins-api

Rules API for Magic: The Gathering
https://api.academyruins.com/docs
GNU Affero General Public License v3.0
4 stars 1 forks source link

Override standard 500 response #32

Closed lunakv closed 1 year ago

lunakv commented 1 year ago

Exceptions in the application code result in a 500 response, but the default response format for that isn't a JSON. We should override that handler so that it serves JSONs even in that situation.

The response should maybe also contain some form of unique ID which will then be referenced in the logs for this error.