From f3e5838b89b4b24d6a905afa94c6dbd1f995e83d Mon Sep 17 00:00:00 2001 From: Robert Raposa Date: Tue, 5 Oct 2021 14:08:22 -0400 Subject: [PATCH] docs: update unexpected_multiple_exceptions comment (#28939) Update the unexpected_multiple_exceptions comment based on findings from monitoring since this was originally released. --- openedx/core/lib/request_utils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openedx/core/lib/request_utils.py b/openedx/core/lib/request_utils.py index 8de5af8526..bd0cad3806 100644 --- a/openedx/core/lib/request_utils.py +++ b/openedx/core/lib/request_utils.py @@ -476,8 +476,9 @@ def _log_and_monitor_expected_errors(request, exception, caller): set_custom_attribute('checked_error_expected_from', 'multiple') return - # Currently, it seems unexpected that middleware and drf will both handle different uncaught exceptions. - # We will monitor for this and adjust accordingly if it turns out this is a common case. + # We have confirmed using monitoring that it is very rare that middleware and drf handle different uncaught exceptions. + # We will leave this attribute in place, but it is not worth investing in a workaround, especially given that + # New Relic now offers its own expected error functionality, and this functionality may be simplified or removed. set_custom_attribute('unexpected_multiple_exceptions', cached_module_and_class) log.warning( "Unexpected scenario where different exceptions are handled by _log_and_monitor_expected_errors. "