Skip to content
Myr

Make exception contents conditional on DEBUG

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Keyan Pishdadian · committed by Keyan Pishdadian · parent 5d3e7b7 · Browse files · 1 file+5 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+5 added−3 removed

  • other:+5 added−3 removed

1 file+5 added−3 removed

modified:flask/wrappers.py+5 added-3 removed
11 unmodified lines
12from werkzeug.wrappers import Request as RequestBase, Response as ResponseBase13from werkzeug.exceptions import BadRequest1415from . import json16from .globals import _request_ctx_stack16from .globals import _request_ctx_stack, current_app171818_missing = object()192021def _get_data(req, cache):
151 unmodified lines
173 add it by subclassing.174175 .. versionadded:: 0.8176 """177 if current_app.config['DEBUG']:178 raise BadRequest(e)178 raise BadRequest(e)179 else:180 raise BadRequest()181182 def _load_form_data(self):183 RequestBase._load_form_data(self)184
19 unmodified lines