# 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
1. **Auto-capture plus manual capture.** The framework integration captures the error AND your error-handling middleware calls `captureException` on the same error. In Express, the fix is `shouldHandleError: false` when you capture manually. In Django/Flask, check for both the SDK integration and a custom `process_exception` or error handler calling `capture_exception`.
2. **Global handler plus local try/catch.** `window.onerror`/`unhandledrejection` capture plus an explicit `captureException` in a catch block. Pick one path per error.
3. **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.