Skip to content

Commit

Permalink
Fix unbound local crash on handling aws lambda exception (#977)
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Sussman authored Jan 18, 2021
1 parent abf2bc3 commit 2af3274
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sentry_sdk/integrations/aws_lambda.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ def sentry_handler(aws_event, aws_context, *args, **kwargs):
configured_time = aws_context.get_remaining_time_in_millis()

with hub.push_scope() as scope:
timeout_thread = None
with capture_internal_exceptions():
scope.clear_breadcrumbs()
scope.add_event_processor(
Expand All @@ -115,7 +116,6 @@ def sentry_handler(aws_event, aws_context, *args, **kwargs):
scope.set_tag("batch_request", True)
scope.set_tag("batch_size", batch_size)

timeout_thread = None
# Starting the Timeout thread only if the configured time is greater than Timeout warning
# buffer and timeout_warning parameter is set True.
if (
Expand Down

0 comments on commit 2af3274

Please sign in to comment.