lundi 26 septembre 2016

Rails default exception handling for JSON

By default Rails serves a helpful HTML page for 404 Resource Not Found and 500 Internal Server Error. But for my JSON API I'd like to serve JSON-formatted replies.

I don't want a solution that requires per-controller implementations, this should be default exception handling for all API requests.

Aucun commentaire:

Enregistrer un commentaire