MatchmakerExchange / reference-server

A simple Flask server that implements the Matchmaker Exchange API
http://matchmakerexchange.org
MIT License
8 stars 8 forks source link

Handle errors with proper JSON message bodies #3

Closed buske closed 7 years ago

buske commented 8 years ago

Currently, validation and header errors are the default errors raised by other packages. This should be intercepted and customized so the response body is JSON-formatted as per the spec.

buske commented 7 years ago

This should now be implemented across the board, at least for likely errors. A top-level try except should probably be added that returns a 500, but this should be good enough for the time being.