Skip to content

Commit 5374552

Browse files
.
1 parent 3492eea commit 5374552

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

sentry_sdk/tracing.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -982,12 +982,11 @@ def _in_http_status_code_range(self, code, code_ranges):
982982
wrong_type_message = "trace_ignore_status_codes must be a list of integers or pairs of integers."
983983
try:
984984
low, high = target
985-
if isinstance(code, int) and (
986-
not isinstance(low, int) or not isinstance(high, int)
987-
):
985+
if not isinstance(low, int) or not isinstance(high, int):
988986
logger.warning(wrong_type_message)
989987
continue
990-
elif not isinstance(code, int):
988+
989+
if not isinstance(code, int):
991990
logger.warning(
992991
f"Invalid type for http.response.status_code; is {code!r} of type {type(code)}, expected an int."
993992
)
@@ -997,12 +996,6 @@ def _in_http_status_code_range(self, code, code_ranges):
997996
return True
998997

999998
except Exception:
1000-
if not isinstance(code, int):
1001-
logger.warning(
1002-
f"Invalid type for http.response.status_code; is {code!r} of type {type(code)}, expected an int."
1003-
)
1004-
continue
1005-
1006999
logger.warning(wrong_type_message)
10071000

10081001
return False

0 commit comments

Comments
 (0)