File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -659,8 +659,6 @@ def handle_error(self, e):
659
659
:param Exception e: the raised Exception object
660
660
661
661
"""
662
- got_request_exception .send (current_app ._get_current_object (), exception = e )
663
-
664
662
# When propagate_exceptions is set, do not return the exception to the
665
663
# client if a handler is configured for the exception.
666
664
if (
@@ -690,6 +688,10 @@ def handle_error(self, e):
690
688
)
691
689
break
692
690
else :
691
+ # Flask docs say: "This signal is not sent for HTTPException or other exceptions that have error handlers
692
+ # registered, unless the exception was raised from an error handler."
693
+ got_request_exception .send (current_app ._get_current_object (), exception = e )
694
+
693
695
if isinstance (e , HTTPException ):
694
696
code = HTTPStatus (e .code )
695
697
if include_message_in_response :
You can’t perform that action at this time.
0 commit comments