make debugging bad key errors easier

* TRAP_BAD_REQUEST_ERRORS is enabled by default in debug mode
* BadRequestKeyError has the key in the description in debug mode

closes #382
This commit is contained in:
David Lord 2017-05-29 19:08:25 -07:00
parent fb90c310b9
commit 045dccaefb
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8
4 changed files with 37 additions and 7 deletions

View file

@ -109,9 +109,10 @@ The following configuration values are used internally by Flask:
Trying to access a key that doesn't exist from request dicts like ``args``
and ``form`` will return a 400 Bad Request error page. Enable this to treat
the error as an unhandled exception instead so that you get the interactive
debugger. This is a more specific version of ``TRAP_HTTP_EXCEPTIONS``.
debugger. This is a more specific version of ``TRAP_HTTP_EXCEPTIONS``. If
unset, it is enabled in debug mode.
Default: ``False``
Default: ``None``
.. py:data:: SECRET_KEY