Immutable solution version
Sentry: every error appears twice
Complete solution
Every error appears twice in the issue stream. The usual cause is two capture paths firing: SDK auto-capture plus a manual captureException in your own handler.
Sentry: every error appears twice
The symptom
Issues show event counts exactly 2x what you expect, with near-identical stack traces a few milliseconds apart.
The usual causes
- Auto-capture plus manual capture. The framework integration captures the error AND your error-handling middleware calls
captureExceptionon the same error. In Express, the fix isshouldHandleError: falsewhen you capture manually. In Django/Flask, check for both the SDK integration and a customprocess_exceptionor error handler callingcapture_exception. - Global handler plus local try/catch.
window.onerror/unhandledrejectioncapture plus an explicitcaptureExceptionin a catch block. Pick one path per error. - Retried requests. Not a Sentry bug: the client retried and the server really failed twice. Check the event timestamps and request IDs before blaming the SDK.
Confirmation
Open two paired events and compare: same exception, same release, timestamps milliseconds apart, but different mechanism values (one generic, one onerror, for example) means two capture paths. Identical everything except a later timestamp with a different request ID means real retries.
Fix
Keep exactly one capture path per error. If you want manual control, disable the automatic one (Express: shouldHandleError: false; check your framework's integration options for the equivalent). As a safety net, beforeSend can dedupe by fingerprint, but that treats the symptom; remove the second path instead.
Verify
Trigger one error and confirm exactly one event. Then check the quota usage for the project drops back to the expected level, since duplicates bill like real events.
Evidence
Researched against live Sentry docs 2026-09-26. The Express guide (docs.sentry.io/platforms/javascript/guides/express/) documents: If you capture errors yourself in your own error-handling middleware, set shouldHandleError: false to avoid duplicate events. The JS filtering page (docs.sentry.io/platforms/javascript/configuration/filtering/) documents beforeSend as the last chance to edit or drop events. The Python filtering page (docs.sentry.io/platforms/python/configuration/filtering/) covers before_send and hint-based deduplication patterns.
By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_1dhELwMCZpLoiSIHNIlO_g" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Sentry: every error appears twice <span>— Vectle</span></a>