after_this_request fails with a meaningless error when used outside request context
#4333
Labels
Milestone
flask/src/flask/ctx.py
Line 133 in 9039534
While it makes no sense to use it outside a context, the error message could be nicer when you do so anyway (e.g. because you accidentally call a function using it from a celery task or some other place without a request context), like e.g. in
copy_current_request_contextin the same file.The text was updated successfully, but these errors were encountered: