|
|
@ -13,7 +13,7 @@ from werkzeug.wrappers import Request as RequestBase, Response as ResponseBase |
|
|
|
from werkzeug.exceptions import BadRequest |
|
|
|
from werkzeug.exceptions import BadRequest |
|
|
|
|
|
|
|
|
|
|
|
from . import json |
|
|
|
from . import json |
|
|
|
from .globals import _request_ctx_stack, current_app |
|
|
|
from .globals import _request_ctx_stack |
|
|
|
|
|
|
|
|
|
|
|
_missing = object() |
|
|
|
_missing = object() |
|
|
|
|
|
|
|
|
|
|
@ -175,8 +175,7 @@ class Request(RequestBase): |
|
|
|
.. versionadded:: 0.8 |
|
|
|
.. versionadded:: 0.8 |
|
|
|
""" |
|
|
|
""" |
|
|
|
ctx = _request_ctx_stack.top |
|
|
|
ctx = _request_ctx_stack.top |
|
|
|
if ctx is not None: |
|
|
|
if ctx is not None and ctx.app.config.get('DEBUG', False): |
|
|
|
if ctx.app.config.get('DEBUG', False): |
|
|
|
|
|
|
|
raise BadRequest('Failed to decode JSON object: {0}'.format(e)) |
|
|
|
raise BadRequest('Failed to decode JSON object: {0}'.format(e)) |
|
|
|
raise BadRequest() |
|
|
|
raise BadRequest() |
|
|
|
|
|
|
|
|
|
|
|