fix: stop reporting expected errors to sentry - #3735
Merged
Conversation
kolaente
approved these changes
Sep 4, 2026
kolaente
enabled auto-merge (rebase)
September 4, 2026 21:00
Preview DeploymentPreview deployments for this PR are available at:
The preview environment will start automatically on first visit. Subsequent pushes to this PR will update the Run locally with Dockerdocker pull ghcr.io/go-vikunja/vikunja:pr-3735
docker run -p 3456:3456 ghcr.io/go-vikunja/vikunja:pr-3735Last updated for commit 80888ae |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three classes of expected errors flood Sentry. None are bugs. All still reach user through UI or logs.
Token refresh (FRONTEND-OSS-2FB/2FR/2GY/2HS/2JQ, ~35k events).
auth.tswraps failed/user/token/refreshinnew Error('Error renewing token: ', {cause: e}). Cause is AxiosError 401 — expired session, expected. OldbeforeSenddropped bare AxiosError only, so wrapper slipped through. NewshouldDropEvent()walkscausechain (depth cap 10, survives cycles).Stale chunks (FRONTEND-OSS-1QF/2GD/2FS). Old index.html open, deploy changed asset hashes, dynamic import 404s. Now
handleChunkLoadErrors()catches Vitevite:preloadErrorand reloads page; sessionStorage timestamp caps one reload per 60s, so second failure propagates instead of looping.beforeSendalso drops chunk-load messages that arrive by other paths.Webhook deliveries (API-OSS-2Y, ~4.4k events). User webhook returning 404 forever poisons a message per event; poison logger sent every one to Sentry.
WebhookDeliveryListenernow setsevents.MetadataSkipErrorReportingbefore returning a delivery error — watermill poison middleware republishes same message, so flag survives. Retries and poisoning unchanged,log.Errorfunchanged. Errors before delivery (unmarshal, DB lookup, nil payload) are ours and still reported.How to verify
Log in, then invalidate the session (clear the refresh cookie) and trigger a token refresh.
Expected: the 401 is handled as before (redirect to login), and no Sentry event is captured for it.
Before this PR: an
Error renewing token:event was sent to Sentry.Create a project webhook pointing at a URL that returns 404, then update a task in that project.
Expected: the API log still shows
webhook N returned non-success status 404and the message is retried and parked in the poison queue, but no Sentry exception is captured.