feat(iswf): Adds Issue label, org label coarse data model #114925
2 issues
Medium
IssueLabel.update() raises DoesNotExist on missing/deleted record - `src/sentry/issues/services/issue_label/service.py:47`
IssueLabel.objects.get(id=issue_label_id) is called without handling IssueLabel.DoesNotExist. If the label was deleted concurrently or the ID is stale/invalid (e.g., from an API request), this raises an unhandled exception that propagates as a 500. Service-layer mutation entry points should surface a graceful error so callers can return 404.
Also found at:
src/sentry/issues/services/issue_label/service.py:65src/sentry/issues/services/issue_label/service.py:99
create() and create_org_label() do not handle unique constraint violations - `src/sentry/issues/services/issue_label/service.py:28-32`
IssueLabel.objects.create() and OrganizationLabel.objects.create() are called without handling IntegrityError. If unique constraints exist (likely for (group_id, label_id) on IssueLabel and (organization_id, label_name) on OrganizationLabel based on typical label data models), duplicate creation requests will raise an unhandled IntegrityError resulting in a 500. This is Check 7 (Database Constraint Violations).
5 skills analyzed
| Skill | Findings | Duration | Cost |
|---|---|---|---|
| sentry-backend-bugs | 2 | 40.3s | $1.03 |
| wrdn-pii | 0 | 39.8s | $0.94 |
| wrdn-authz | 0 | 57.2s | $0.65 |
| wrdn-code-execution | 0 | 20.6s | $0.60 |
| wrdn-data-exfil | 0 | 48.3s | $0.60 |
Duration: 3m 26s · Tokens: 816.9k in / 2.8k out · Cost: $3.83 (+extraction: $0.01, +merge: $0.00)