DEV Community

Discussion on: Flask Rest API -Part:4- Exception Handling

Collapse
 
argiriraj profile image
Giriraj AR

I Found a solution,

the parameter error accepts only dictionary, so merge the different error dictionary into one and then pass that dictionary
example:
collective_errors = {**user_errors, **resource_errors}
api = Api(app, errors=collective_errors)