Skip to content

Commit 2af3274

Browse files
author
Adam Sussman
authored
Fix unbound local crash on handling aws lambda exception (getsentry#977)
1 parent abf2bc3 commit 2af3274

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sentry_sdk/integrations/aws_lambda.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ def sentry_handler(aws_event, aws_context, *args, **kwargs):
101101
configured_time = aws_context.get_remaining_time_in_millis()
102102

103103
with hub.push_scope() as scope:
104+
timeout_thread = None
104105
with capture_internal_exceptions():
105106
scope.clear_breadcrumbs()
106107
scope.add_event_processor(
@@ -115,7 +116,6 @@ def sentry_handler(aws_event, aws_context, *args, **kwargs):
115116
scope.set_tag("batch_request", True)
116117
scope.set_tag("batch_size", batch_size)
117118

118-
timeout_thread = None
119119
# Starting the Timeout thread only if the configured time is greater than Timeout warning
120120
# buffer and timeout_warning parameter is set True.
121121
if (

0 commit comments

Comments
 (0)