Skip to content

Commit 7e39d58

Browse files
check None before setting attribute
1 parent c3a55c6 commit 7e39d58

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

sentry_sdk/integrations/boto3.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ def _sentry_request_created(
8585
span.set_attribute(SPANDATA.URL_FRAGMENT, parsed_url.fragment)
8686

8787
span.set_attribute(SPANDATA.RPC_METHOD, f"{service_id}/{operation_name}")
88-
span.set_attribute(SPANDATA.HTTP_REQUEST_METHOD, request.method)
88+
if request.method is not None:
89+
span.set_attribute(SPANDATA.HTTP_REQUEST_METHOD, request.method)
8990
else:
9091
span = sentry_sdk.start_span(
9192
op=OP.HTTP_CLIENT,

0 commit comments

Comments
 (0)