Skip to content

aws_lambda integration fails with empty event list #2847

Closed
@tlorenz-reply

Description

@tlorenz-reply

How do you use Sentry?

Self-hosted/on-premise

Version

1.42.0

Steps to Reproduce

Lambdas used in Stepfunctions can have an empty event list as input. If that is the case, the aws_lambda integration wrap handler fails with an IndexError because it is gets the first entry in the list, although it does not contain any entries.

request_data = aws_event[0]

Expected Result

wrap handler should set request_data to {} if aws_event is an empty list

Actual Result

[ERROR] IndexError: list index out of range
Traceback (most recent call last):
File "/opt/python/sentry_sdk/integrations/aws_lambda.py", line 85, in sentry_handler
request_data = aws_event[0]

Metadata

Metadata

Assignees

Type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions