Closed fenekku closed 4 years ago
Turns out that using error_handler would require a refactor of resource_requestctx first:
By the time error_handler is called, the exception has bubbled up outside of the context manager. So we don't have access to it anymore and it holds the response_handler which we need to serialize errors.
By refactoring per https://github.com/inveniosoftware/flask-resources/issues/2 the context will still be available (I think... :sweat_smile: ). In any case, decorators have been used for now.
Story around error seriliazation needs to be completed: we need to mimic more generally invenio-rest in flask-resources.
Let's use
error_handlers
to do the work for us.