Skip to content

Commit e851dfa

Browse files
check not none
1 parent 74cde81 commit e851dfa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sentry_sdk/tracing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1070,11 +1070,11 @@ def finish(
10701070
super().finish(scope, end_timestamp)
10711071

10721072
status_code = self._data.get(SPANDATA.HTTP_STATUS_CODE)
1073-
if status_code and not isinstance(status_code, int):
1073+
if status_code is not None and not isinstance(status_code, int):
10741074
logger.warning(
10751075
f"Invalid type for http.response.status_code; is {status_code!r} of type {type(status_code)}, expected an int."
10761076
)
1077-
elif status_code and self._in_http_status_code_range(
1077+
elif status_code is not None and self._in_http_status_code_range(
10781078
status_code,
10791079
client.options["trace_ignore_status_codes"],
10801080
):

0 commit comments

Comments
 (0)