feat(autofix): Update seer explorer autofix last triggered on completion#111663
1 issue
sentry-backend-bugs: Found 1 issue (1 medium)
Medium
Unhandled Group.DoesNotExist in completion hook causes webhook failure - `src/sentry/seer/autofix/on_completion_hook.py:85`
The Group.objects.get() call at line 85 does not handle Group.DoesNotExist. When an autofix run completes but the referenced group has been deleted (merged, archived, or removed) between run start and completion, this raises an exception. While the RPC layer catches ObjectDoesNotExist and returns a 404, this is inconsistent with line 82-83 which gracefully returns when group_id is None. A deleted group should trigger the same graceful skip behavior, not an error response to the webhook caller.
Duration: 2m 13s · Tokens: 653.3k in / 7.3k out · Cost: $1.00 (+extraction: $0.00, +fix_gate: $0.00)
Annotations
Check warning on line 85 in src/sentry/seer/autofix/on_completion_hook.py
sentry-warden / warden: sentry-backend-bugs
Unhandled Group.DoesNotExist in completion hook causes webhook failure
The `Group.objects.get()` call at line 85 does not handle `Group.DoesNotExist`. When an autofix run completes but the referenced group has been deleted (merged, archived, or removed) between run start and completion, this raises an exception. While the RPC layer catches `ObjectDoesNotExist` and returns a 404, this is inconsistent with line 82-83 which gracefully returns when `group_id is None`. A deleted group should trigger the same graceful skip behavior, not an error response to the webhook caller.