You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error classes deal with abstracting a representation of the errors in the Flask views, so that they can be serialized in a second phase.
Right now they are coupled to a JSON serialization (in the class itself). However, this should be done by the make_error_response function in the resources.py (per resource class). Serializing according to the accepted mimetype.
Open Questions:
Should the error object implement Serializable? Should it be a different mixin "SerialiableError"?
ppanero
changed the title
Review errors.py and decouple error abstraction from serialization
serializers: review errors.py and decouple error abstraction from serialization
Jun 11, 2020
Error classes deal with abstracting a representation of the errors in the Flask views, so that they can be serialized in a second phase.
Right now they are coupled to a JSON serialization (in the class itself). However, this should be done by the
make_error_response
function in theresources.py
(per resource class). Serializing according to the accepted mimetype.Open Questions:
serialize_error
and themake_error_response
play with abort, application errors and handlers.The text was updated successfully, but these errors were encountered: