We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 74cde81 commit e851dfaCopy full SHA for e851dfa
sentry_sdk/tracing.py
@@ -1070,11 +1070,11 @@ def finish(
1070
super().finish(scope, end_timestamp)
1071
1072
status_code = self._data.get(SPANDATA.HTTP_STATUS_CODE)
1073
- if status_code and not isinstance(status_code, int):
+ if status_code is not None and not isinstance(status_code, int):
1074
logger.warning(
1075
f"Invalid type for http.response.status_code; is {status_code!r} of type {type(status_code)}, expected an int."
1076
)
1077
- elif status_code and self._in_http_status_code_range(
+ elif status_code is not None and self._in_http_status_code_range(
1078
status_code,
1079
client.options["trace_ignore_status_codes"],
1080
):
0 commit comments