During recent testing the API logs were full of GitHub ticket-provider 401s (`Bad credentials`) — the ticket sync worker runs every N seconds and each attempt fails, generating noise. The user has no in-UI signal that ticket sync is broken.
Example log spam:
```
msg: Failed to sync tickets from provider
provider: github
err: HttpError: Bad credentials - https://docs.github.com/rest
```
Fix:
- Persist the last sync error per `ticket_provider` row (add `last_error`, `last_error_at`)
- Surface on the Settings > Ticket Providers page with a clear "Refresh token" CTA
- Stop logging the full HTTP error on repeated failures (log once per hour at most, or downgrade to debug after the first failure)
Also consider: disable the provider automatically after N consecutive failures, re-enable on user action.
During recent testing the API logs were full of GitHub ticket-provider 401s (`Bad credentials`) — the ticket sync worker runs every N seconds and each attempt fails, generating noise. The user has no in-UI signal that ticket sync is broken.
Example log spam:
```
msg: Failed to sync tickets from provider
provider: github
err: HttpError: Bad credentials - https://docs.github.com/rest
```
Fix:
Also consider: disable the provider automatically after N consecutive failures, re-enable on user action.