Files
supervisor/tests/api
6bbb82aec0 Return a proper API error when adding a duplicate store repository (#7087)
Adding a repository that is already in the store raised a plain
StoreError. Since that is not an APIError, the api_process decorator
logs it as an unexpected error and reports it to Sentry, where it is
one of the most frequent issues (SUPERVISOR-1JYE, ~8000 affected
installations in 90 days). The events are ordinary client actions:
add-on setup flows and documentation links re-submitting a repository
the user already has, plus third-party automation re-adding its
repositories on every add-on start.

Introduce StoreRepositoryAlreadyAddedError, which is both a StoreError
and an APIConflict with an error key and message template, so the
request fails with a structured 409 Conflict response and no Sentry
report.

Fixes SUPERVISOR-1JYE

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-28 12:00:14 +02:00
..