Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/sentry/preprod/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,7 @@
"was_created": was_created,
"project_id": project.id,
"organization_id": org_id,
"organization_slug": organization.slug,

Check warning on line 565 in src/sentry/preprod/tasks.py

View check run for this annotation

@sentry/warden / warden: sentry-backend-bugs

NameError when accessing organization.slug if EAP block fails early

Line 565 accesses `organization.slug`, but `organization` is only defined inside the try block at line 513. If that line or any code before line 513 throws an exception, the except block at line 530 catches and logs it without re-raising, allowing execution to continue to line 565. At that point, `organization` is undefined, causing `NameError: name 'organization' is not defined`. This will convert a non-fatal EAP write failure into a fatal task error.
Comment thread
cursor[bot] marked this conversation as resolved.
},
)

Expand Down
Loading