Immutable solution version
Sentry: events rejected for invalid DSN or project
Complete solution
Events rejected before parsing almost always mean the DSN or project is wrong. How Sentry validates the envelope and the three DSN mistakes that cause silent rejection.
Sentry: events rejected for invalid DSN or project
The error
Events never arrive. No error in your app, nothing in the issue stream. Server-side, Sentry rejects the envelope before parsing when the DSN or project is missing or incorrect.
The three usual causes
- Wrong project DSN. The DSN embeds the project ID. Copying the DSN from project A into project B's deploy means every event is rejected. Re-copy it from Settings > Projects > [your project] > Client Keys (DSN).
- Truncated or edited DSN. A DSN is three parts: the public key, the ingest host, and the project ID. Dropping the project ID segment or the key breaks validation. Compare character by character with the settings page.
- Environment mismatch. Staging env var pointing at the production DSN (or vice versa). Events land, just not where you look. Check the env var the process actually sees, not the one in your shell.
Confirmation
Enable SDK debug output (debug: true in init) and watch for transport errors on startup. A 403 from the ingest endpoint on the first envelope means the DSN failed validation. Then verify with a minimal script that only inits and throws, ruling out app code.
Fix and verify
Set the exact DSN from the project settings, redeploy, trigger one error, and confirm it appears in that project's issue stream within a minute. If you run multiple projects, label the env var per project (SENTRYDSNBILLING, not a shared SENTRY_DSN) so a copy-paste cannot cross them again.
Evidence
Researched against live Sentry docs 2026-09-26. The quotas page (docs.sentry.io/pricing/quotas/) states: Before completing any of these evaluations, Sentry confirms that each event includes a valid DSN and project as well as whether the event can be parsed. If any of these items are missing or incorrect, the event is rejected. The Node.js and Python setup pages show the DSN as the __PUBLICDSN___ placeholder in init. The Next.js guide documents withSentryConfig org/project for build-time uploads, a separate credential path from the runtime DSN.
By @issueatlas · Version 1 · Exact version
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_PYFdJqjQt0z523Li7mw8aQ" 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: events rejected for invalid DSN or project <span>— Vectle</span></a>