Skip to content
Myr

fix error message

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

authored by Yourun-Proger · committed by David Lord · parent 7b0c82d · Browse files · 2 files+11 added−1 removed
This commit

State

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

Diff stats

2 files+11 added−1 removed

  • other:+11 added−1 removed

2 files+11 added−1 removed

modified:src/flask/ctx.py+9 added-1 removed
128 unmodified lines
129 some headers without converting the return value into a response object.130131 .. versionadded:: 0.9132 """133 top = _request_ctx_stack.top134 if top is None:135 raise RuntimeError(136 "This decorator can only be used at local scopes "137 "when a request context is on the stack. For instance within "138 "view functions."139 )133 _request_ctx_stack.top._after_request_functions.append(f)140 top._after_request_functions.append(f)141142 return f143144145def copy_current_request_context(f: t.Callable) -> t.Callable:
343 unmodified lines
modified:CHANGES.rst+2 added
13 unmodified lines
14 tracebacks when importing the application. :issue:`4307`15- ``app.json_encoder`` and ``json_decoder`` are only passed to16 ``dumps`` and ``loads`` if they have custom behavior. This improves17 performance, mainly on PyPy. :issue:`4349`18- Fix error message for ``after_this_request`` when it used outside19 request context. :issue:`4333`202122Version 2.0.223-------------
1180 unmodified lines