If JSON parsing fails it now issues a BadRequest exception.

This commit is contained in:
Armin Ronacher 2011-08-08 21:47:26 +02:00
parent acac64e36a
commit ce70131975
4 changed files with 36 additions and 4 deletions

View file

@ -29,6 +29,13 @@ object. With that introduction we moved the implementation details for
the session system into a new module called :mod:`flask.sessions`. If you
used the previously undocumented session support we urge you to upgrade.
If invalid JSON data was submitted Flask will now raise a
:exc:`~werkzeug.exceptions.BadRequest` exception instead of letting the
default :exc:`ValueError` bubble up. This has the advantage that you no
longer have to handle that error to avoid an internal server error showing
up for the user. If you were catching this down explicitly in the past
as `ValueError` you will need to change this.
Version 0.7
-----------