During the implementation of Flask-Resources it became clear that we need to take some choices regarding HTTP error responses from the REST API and how it's implemented.
Error response bodies are not subject to content negotiation and thus always JSON formatted. Further a simple method for error handling and returning JSON formatted responses is presented. The method relies on Flask error handlers and extension of the HTTPException.
During the implementation of Flask-Resources it became clear that we need to take some choices regarding HTTP error responses from the REST API and how it's implemented.
Error response bodies are not subject to content negotiation and thus always JSON formatted. Further a simple method for error handling and returning JSON formatted responses is presented. The method relies on Flask error handlers and extension of the HTTPException.