The 'error' object in the handling of the JSONBadRequest error doesn't have any attribute 'data'. Trying to access to that attribute was raising another exception, so it was not possible to understand the real error.
This must have changed in werkzeug, as I'm pretty certain it worked when I was writing the code. Well, stuff is meant to change :)
In general, this looks good, but please make sure to fix it everywhere in the code, not just in the two places. Thanks!
Ok. I'm fixing all the errors handling. But should I fix also the api_v1.py? Is that still used?
1 new commit added
@gnaponie That can be safely ignored IMO.
rebased onto 2c0eff7d9bee12c256130738d47dfb74315699d6
lgtm now
Pull-Request has been merged by jskladan
The 'error' object in the handling of the JSONBadRequest error doesn't have any attribute
'data'. Trying to access to that attribute was raising another exception, so it was not
possible to understand the real error.