Open yfried opened 2 years ago
I think this is not the right approach how to handle exceptions in Flask. I suggest you to read Error Handlers. That way you route handler just raises exception and your error handler creates JSON response with proper status code.
I would need also the possibility to define specific errors message in each route...
When a route that has
repononse_many
wants to return a proper error code on a, flask-pydantic crashes withThis should return a 400 error
But instead, the server breaks and raises a exception:
There should be some way to describe the error responses that shouldn't be a an array.