inveniosoftware / rfcs

RFCs for Invenio.
https://rfcs.readthedocs.io
4 stars 15 forks source link

framework: error handling and response for REST #35

Closed lnielsen closed 3 years ago

lnielsen commented 4 years ago

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.

lnielsen commented 4 years ago

I've added a section about scope. Please check and see if this clarifies.