fix(sentry): point sourcemap upload at the EU data region #140

Merged
ullrich merged 1 commit from fix-sentry-eu-region-url into main 2026-09-11 08:43:13 +00:00
Owner

Fixes the 401 in #5.

The bug

sentry-cli sends every API call to https://sentry.io unless you tell it otherwise. Our Sentry org is in the EU data region — every DSN in the repo carries an o4509530546634752.ingest.de.sentry.io host. The US endpoint does not know an EU-issued token, so it answers:

sentry reported an error: Invalid token (http status: 401)

That 401 reads like a permissions problem, which is why #5 chased token scopes. But a scope problem gives 403; a 401 means the wrong endpoint. No SENTRY_URL is set anywhere in the repo and neither vite config passed a url option, so both apps have always uploaded to the wrong region.

The fix

Set the plugin's url to https://de.sentry.io in both vite.config.ts files. This covers every build path — Docker, CI, local — with no workflow or secrets change. The value sits next to the org and project values it belongs with, both of which are already hardcoded.

Still open in #5

A failed upload still does not fail the build: sentry-vite-plugin reports the error and the build continues. That is why this rotted unnoticed for six weeks. The follow-up stays open.

Verification

pnpm typecheck, pnpm lint and pnpm test all pass. I did not run pnpm test:e2e locally — it needs the full Docker stack, and this change cannot reach it, because the plugin is disabled when SENTRY_AUTH_TOKEN is absent and the e2e suite never sets one. CI runs it.

The real proof is the next production deploy: cd-apps must build without the 401, and a release for the new SHA must appear in Sentry. If the 401 continues, the token is bad as well as mis-routed, and it needs a rotation to an Organization Auth Token.

Refs #5

🤖 Generated with Claude Code

Fixes the 401 in #5. ## The bug `sentry-cli` sends every API call to `https://sentry.io` unless you tell it otherwise. Our Sentry org is in the **EU data region** — every DSN in the repo carries an `o4509530546634752.ingest.de.sentry.io` host. The US endpoint does not know an EU-issued token, so it answers: ``` sentry reported an error: Invalid token (http status: 401) ``` That 401 reads like a permissions problem, which is why #5 chased token scopes. But a scope problem gives **403**; a **401** means the wrong endpoint. No `SENTRY_URL` is set anywhere in the repo and neither vite config passed a `url` option, so both apps have always uploaded to the wrong region. ## The fix Set the plugin's `url` to `https://de.sentry.io` in both `vite.config.ts` files. This covers every build path — Docker, CI, local — with no workflow or secrets change. The value sits next to the `org` and `project` values it belongs with, both of which are already hardcoded. ## Still open in #5 A failed upload still does **not** fail the build: `sentry-vite-plugin` reports the error and the build continues. That is why this rotted unnoticed for six weeks. The follow-up stays open. ## Verification `pnpm typecheck`, `pnpm lint` and `pnpm test` all pass. I did not run `pnpm test:e2e` locally — it needs the full Docker stack, and this change cannot reach it, because the plugin is disabled when `SENTRY_AUTH_TOKEN` is absent and the e2e suite never sets one. CI runs it. The real proof is the next production deploy: `cd-apps` must build without the 401, and a release for the new SHA must appear in Sentry. If the 401 continues, the token is bad as well as mis-routed, and it needs a rotation to an Organization Auth Token. Refs #5 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(sentry): point sourcemap upload at the EU data region
All checks were successful
CD Staging / Build & Push Docker Images (pull_request) Has been skipped
CD Staging / Build & Push Docker Images-1 (pull_request) Has been skipped
CD Staging / Deploy Staging (pull_request) Has been skipped
CD Staging / Deploy PR Preview (pull_request) Has been skipped
CI / Dockerfile Package Check (pull_request) Successful in 27s
CI / Security Scan (pull_request) Successful in 57s
CI / Visual Tests (pull_request) Successful in 1m54s
CI / Checks (pull_request) Successful in 6m46s
CI / Journal Image Smoke Test (pull_request) Successful in 8m51s
CI / E2E Tests (pull_request) Successful in 5m57s
Cancel superseded CI / Cancel in-flight CI (pull_request) Successful in 16s
CD Staging / Tear Down PR Preview (pull_request) Successful in 50s
f2c7556ac7
sentry-cli sends every API call to https://sentry.io unless you tell it
otherwise. Our org is in the EU region — every DSN in the repo carries an
`o4509530546634752.ingest.de.sentry.io` host — so the US endpoint does not
know our token and answers `Invalid token (http status: 401)`.

That 401 reads like a permissions problem, which is why issue #5 chased
token scopes for six weeks. Scopes give 403; 401 is the wrong endpoint.

Set the plugin's `url` to https://de.sentry.io in both apps. This covers
every build path (Docker, CI, local) without a workflow or secrets change.

The upload still fails the build silently — sentry-vite-plugin reports the
error and carries on. That follow-up stays open in #5.

Refs #5

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
ullrich deleted branch fix-sentry-eu-region-url 2026-09-11 08:43:14 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
trails-cool/trails!140
No description provided.