Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
.
  • Loading branch information
alexander-alderman-webb committed Sep 26, 2025
commit 5374552625342eff77ea8e614da24557ed384d1c
13 changes: 3 additions & 10 deletions sentry_sdk/tracing.py
Original file line number Diff line number Diff line change
Expand Up @@ -982,12 +982,11 @@ def _in_http_status_code_range(self, code, code_ranges):
wrong_type_message = "trace_ignore_status_codes must be a list of integers or pairs of integers."
try:
low, high = target
if isinstance(code, int) and (
not isinstance(low, int) or not isinstance(high, int)
):
if not isinstance(low, int) or not isinstance(high, int):
logger.warning(wrong_type_message)
continue
elif not isinstance(code, int):

if not isinstance(code, int):
logger.warning(
f"Invalid type for http.response.status_code; is {code!r} of type {type(code)}, expected an int."
)
Expand All @@ -997,12 +996,6 @@ def _in_http_status_code_range(self, code, code_ranges):
return True

except Exception:
if not isinstance(code, int):
logger.warning(
f"Invalid type for http.response.status_code; is {code!r} of type {type(code)}, expected an int."
)
continue

logger.warning(wrong_type_message)

return False
Expand Down
Loading