Skip to content

Commit d4e8d47

Browse files
committed
Check for headers from Eventbridge
1 parent c42a4eb commit d4e8d47

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sentry_sdk/integrations/aws_lambda.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,9 @@ def _get_url(aws_event, aws_context):
376376
path = aws_event.get("path", None)
377377

378378
headers = aws_event.get("headers")
379-
if headers is None:
379+
# Some AWS Services (ie. EventBridge) set headers as a list
380+
# or None, so we must ensure it is a dict
381+
if not isinstance(headers, dict):
380382
headers = {}
381383

382384
host = headers.get("Host", None)

0 commit comments

Comments
 (0)