Skip to content

feat(apidocs): Publish dsn-lookup endpoint - #130367

Merged
BYK merged 1 commit into
masterfrom
byk/feat/apidocs-publish-dsn-lookup
Nov 9, 2026
Merged

BYK merged 1 commit into
masterfrom
byk/feat/apidocs-publish-dsn-lookup

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Part of the #130351 proposal to publish endpoints that the Sentry CLI (getsentry/toolkit) calls with raw requests today, so they appear in the public OpenAPI schema and in the generated @sentry/api SDK.

This PR makes GET /api/0/organizations/{organization_id_or_slug}/dsn-lookup/ (DsnLookupEndpoint, owned by Telemetry Experience) PUBLIC and documents it.

Evidence

  • Added in feat(cmd-k): Add DSN lookup API endpoint #108400, shipped 2026-02-18. The endpoint code hasn't changed since then.
  • Current caller: the command palette's global actions (commandPaletteGlobalActions.tsx). The CLI wants to use it to resolve a DSN to its project.

Changes

  • publish_status changes from PRIVATE to PUBLIC. The Projects tag and the operation id resolveOrganizationDsn are added.
  • New DsnLookupResponse TypedDict, checked against the response the code builds. projectPlatform and keyLabel can be null.
  • Documents the required dsn query param and the 200/400/401/403/404/429 responses. The docstring explains that only the DSN's public key is used, and when the endpoint returns 400 or 404.
  • Adds the ProjectExamples.RESOLVE_DSN example and an apidocs schema test.
  • Publishing the endpoint adds it to AgentTokenPublicGetMatrixTest, so that test now passes a dsn query param built from the matrix's project key.

Verification

  • I ran make build-api-docs on this branch and on master (ac2d476) and diffed openapi-derefed.json. The only changes are the new GET .../dsn-lookup/ operation and the DsnLookupResponse component.
  • python -m sentry.apidocs.response_coverage: 0 new gaps.
  • pnpm run validate-api-examples: no errors.
  • pytest tests/apidocs: 155 passed.
  • The dsn-lookup endpoint and apidocs tests: 6 passed.
  • tests/sentry/seer/endpoints/test_organization_agent_token.py: 325 passed, 23 xfailed.
  • prek and mypy (pre-push stage) pass on the changed files.

The "(Optional) Shows the difference between the prod and dev schema" check is expected to fail because this PR changes the schema.

via @BYK.

--

View Session [Sentry]

Mark GET /organizations/{org}/dsn-lookup/ as PUBLIC and document it so it
reaches the public OpenAPI schema and the generated @sentry/api SDK.

Add a DsnLookupResponse TypedDict, an example, an apidocs test, and a dsn
query param for the endpoint in the agent token permission matrix.

Refs #130351

Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
@sentry-junior
sentry-junior Bot requested review from a team as code owners November 7, 2026 16:21
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Nov 7, 2026
BYK added a commit to getsentry/toolkit that referenced this pull request Nov 7, 2026
… revision operations (#2093)

Next batch of moving the CLI onto `@sentry/api` generated operations
(follows #2073, #2075, #2078, #2090).

`@sentry/api` 1.49.0 publishes three endpoints the CLI already calls:

| CLI function | Endpoint | Operation | Published by |
| --- | --- | --- | --- |
| `listTraceLogs` (`log list --trace`, `trace logs`) | `GET
/organizations/{org}/trace-logs/` | `listOrganizationTraceLogs` |
getsentry/sentry#130357 |
| `listDashboardRevisionsPaginated` (`dashboard revisions`) | `GET
/organizations/{org}/dashboards/{id}/revisions/` |
`listOrganizationDashboardRevisions` | getsentry/sentry#130358 |
| `restoreDashboardRevision` (`dashboard restore`) | `POST
/organizations/{org}/dashboards/{id}/revisions/{rev}/restore/` |
`restoreOrganizationDashboardRevision` | getsentry/sentry#130358 |

These calls stop using `apiRequestToRegion` and behave the same as
before:
- The CLI's valibot schemas still validate each response, so schema
mismatches still fail as "Unexpected response format".
- Region routing goes through `getOrgSdkConfig`.
- Pagination still uses the Link-header cursors, including the previous
cursor for revisions.
- 401/403 errors are still enriched by `unwrapResult`.
- On the wire, `traceId` and `sort` are sent as single repeated params,
the same as before.
- The dashboard and revision ids are passed as strings with the same
cast `getDashboard` uses. The SDK URL-encodes them the way the old code
did.

All three operations have `experimental: false`.

Bumping to 1.49.0 also pulls in the 1.47.0 regen and 1.48.0's
`experimental` flag. Typecheck and generated docs don't change.

### Still on the helpers

| Call site | Endpoint | Waiting on |
| --- | --- | --- |
| `issues.ts` `getSharedIssue` (raw fetch) | `GET
/shared/issues/{share_id}/` | getsentry/sentry#130359 merged after the
1.49.0 regen, so it needs the next release |
| `releases.ts` set-commits | `GET
/organizations/{org}/releases/{version}/previous-with-commits/` | same
as above (#130359) |
| `org-auth-tokens.ts` (3 sites) | list/create/delete
`/organizations/{org}/org-auth-tokens/` | getsentry/sentry#130360
(auto-merging) |
| `projects.ts` dsn-lookup | `GET /organizations/{org}/dsn-lookup/` |
getsentry/sentry#130367 |
| `auth.ts` | `GET /api/0/` (control silo) | getsentry/sentry#130369 |
| `users.ts` | `GET /auth/` → `GET /users/me/` | getsentry/sentry#130368
|
| `organizations.ts` | `GET /users/me/regions/` | #2091 replaces it with
`listOrganizations` |
| `traces.ts` / `logs.ts` | `GET
/projects/{org}/{project}/trace-items/{id}/` | sentry publish PR still
to come |
| `preprod-artifacts.ts` | build assemble, snapshot archive status and
trigger, snapshot create (zstd body) | sentry publish PRs still to come
|
| `projects.ts` | `GET /projects/?query=dsn:` fallback for old
self-hosted servers | not public; needs a decision (see below) |

These are the agreed exceptions: `trials.ts` (`/customers/*` and the
product-trial PUT), snapshot `upload-options` and archive `?download`,
`downloadBuildArtifact`'s install URL, chunk-upload server URLs, and
`rawApiRequest` for `sentry api`.

**Needs a decision:** the self-hosted DSN fallback from #2090 calls `GET
/projects/?query=dsn:`, which isn't in the public schema. It needs to be
added to the exception list for the lint rule, or dropped once old
self-hosted versions age out.

### Testing

- `pnpm run tsc` and `pnpm run lint` pass.
- `pnpm run test` fails only on the 5 file-permission tests that also
fail on `main` in the sandbox (`completions` ×2, `upgrade`,
`db/resilient`, `dsn/code-scanner`), plus `@sentry/cli3to4`, whose
codemod binary needs GLIBC 2.35.
- Added unit tests for the revision list (cursors, schema rejection) and
for restore (operation args, error naming). The trace-logs test now
checks `traceId` and `sort` on the wire.

<!-- junior-request-attribution:start -->
via @BYK.
<!-- junior-request-attribution:end -->

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:agent%3A80220b9d4c297e2a971f05dcb03af515 -->

--

[View
Session](https://junior-prod.sentry.dev/conversations/agent%3A80220b9d4c297e2a971f05dcb03af515)
[[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3A80220b9d4c297e2a971f05dcb03af515/?project=4510944073809921)

<!-- junior-session-footer:end -->

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: BYK <126780+BYK@users.noreply.github.com>
BYK pushed a commit to getsentry/toolkit that referenced this pull request Nov 7, 2026
…-release and shared-issue operations (#2095)

Next batch of moving the CLI onto `@sentry/api` generated operations.
Stacked on #2093 (1.49.0). It gets retargeted to `main` once #2093
merges.

`@sentry/api` 1.50.0 publishes five endpoints the CLI already calls:

| CLI function | Endpoint | Operation | Published by |
| --- | --- | --- | --- |
| `listOrgAuthTokens` (`token list`) | `GET
/organizations/{org}/org-auth-tokens/` | `listOrganizationAuthTokens` |
getsentry/sentry#130360 |
| `createOrgAuthToken` (`token create`) | `POST
/organizations/{org}/org-auth-tokens/` | `createOrganizationAuthToken` |
getsentry/sentry#130360 |
| `deleteOrgAuthToken` (`token delete`) | `DELETE
/organizations/{org}/org-auth-tokens/{id}/` |
`deleteOrganizationAuthToken` | getsentry/sentry#130360 |
| `getPreviousReleaseCommit` (`release set-commits`) | `GET
/organizations/{org}/releases/{version}/previous-with-commits/` |
`getOrganizationPreviousReleaseWithCommits` | getsentry/sentry#130359 |
| `getSharedIssue` (share links in `issue view`), raw `customFetch`
until now | `GET /organizations/{org}/shared/issues/{share_id}/` |
`getOrganizationSharedIssue` | getsentry/sentry#130359 |

All five operations have `experimental: false`.

Behavior is unchanged:
- **Org auth tokens** still go to the control silo, and
`OrgAuthTokenSchema` still validates the responses. 401/403 errors are
still enriched by `unwrapResult`. The token id goes into the path as-is,
with the same `as unknown as number` cast as the other numeric-string
ids.
- **Previous release** routes by org through `getOrgSdkConfig`. The SDK
encodes the version, and the silent fallback to `undefined` stays.
- **Shared issue** calls the operation with `customFetch` rather than
the authenticated transport, because a share URL's host may not be the
logged-in one and must never get a bearer token. Custom headers stay
URL-scoped (`applyCustomHeaders`). The CLI's "TLS certificate error",
"Share link not found or expired", "Failed to resolve share link",
"Share link returned invalid JSON" and missing-issue-ID errors are the
same as before.

The bump regenerates
`plugins/sentry-cli/skills/sentry-cli/references/event.md`, which
reorders the event fields from the schema regen. No fields were added or
removed.

### Still on the helpers

| Call site | Endpoint | Waiting on |
| --- | --- | --- |
| `preprod-artifacts.ts` | build assemble, snapshot archive status and
start, snapshot create (zstd body) | shipped in 1.51.0
(getsentry/sentry#130371). The next stacked branch,
`ref/cli-sentry-api-1.51`, is ready |
| `projects.ts` dsn-lookup | `GET /organizations/{org}/dsn-lookup/` |
getsentry/sentry#130367 |
| `auth.ts` | `GET /api/0/` (control silo) | getsentry/sentry#130369 |
| `users.ts` | `GET /auth/` → `GET /users/me/` | getsentry/sentry#130368
|
| `organizations.ts` | `GET /users/me/regions/` | #2091 replaces it with
`listOrganizations` |
| `traces.ts` / `logs.ts` | `GET
/projects/{org}/{project}/trace-items/{id}/` | sentry publish PR still
to come |
| `replays.ts` replay list | `GET /organizations/{org}/replays/` |
`replay list --json` prints `info_ids`/`warning_ids`, which the
generated `field` enum leaves out. Needs a sentry docs fix or a decision
|
| `projects.ts` | `GET /projects/?query=dsn:` fallback for old
self-hosted servers | not public; needs a decision (see #2093) |

These are the agreed exceptions: `trials.ts` (`/customers/*` and the
product-trial PUT), snapshot `upload-options` and archive `?download`,
`downloadBuildArtifact`'s install URL, chunk-upload server URLs, and
`rawApiRequest` for `sentry api`.

### Testing

- `pnpm run tsc` and `pnpm run lint` pass.
- `pnpm run test` fails only on the 5 file-permission tests that also
fail on `main` in the sandbox (`completions` ×2, `upgrade`,
`db/resilient`, `dsn/code-scanner`), plus `@sentry/cli3to4`, whose
codemod binary needs GLIBC 2.35.
- The org-auth-token tests now go through the mocked SDK fetch and check
the control-silo URL, method, body and error naming. The existing
shared-issue tests (404, TLS, invalid JSON, missing id, header scoping)
pass unchanged.

<!-- junior-request-attribution:start -->
via @BYK.
<!-- junior-request-attribution:end -->

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:agent%3A80220b9d4c297e2a971f05dcb03af515 -->

--

[View
Session](https://junior-prod.sentry.dev/conversations/agent%3A80220b9d4c297e2a971f05dcb03af515)
[[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3A80220b9d4c297e2a971f05dcb03af515/?project=4510944073809921)

<!-- junior-session-footer:end -->

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
BYK pushed a commit to getsentry/toolkit that referenced this pull request Nov 7, 2026
…hot calls (#2097)

Next batch of moving the CLI onto `@sentry/api` generated operations.
Stacked on #2095 (1.50.0), which is stacked on #2093 (1.49.0). Each PR
gets retargeted as the one below it merges.

`@sentry/api` 1.51.0 carries getsentry/sentry#130371, which publishes
the mobile build assemble endpoint and the snapshot archive endpoints,
and adds a typed body for snapshot create. These call sites in
`lib/api/preprod-artifacts.ts` move onto the generated operations:

| CLI function | Endpoint | Operation | `experimental` |
| --- | --- | --- | --- |
| `uploadBuild` assemble poll loop (`build upload`) | `POST
/projects/{org}/{project}/files/preprodartifacts/assemble/` |
`assembleProjectPreprodArtifact` | false |
| `createPreprodSnapshot` (`snapshots upload`) | `POST
/projects/{org}/{project}/preprodartifacts/snapshots/` |
`uploadProjectPreprodArtifactSnapshot` | false |
| `getSnapshotArchiveReady` (`snapshots download`) | `GET
/organizations/{org}/preprodartifacts/snapshots/{id}/archive/` |
`getOrganizationPreprodSnapshotArchiveStatus` | **true** |
| `triggerSnapshotArchiveBuild` (`snapshots download`) | `POST
/organizations/{org}/preprodartifacts/snapshots/{id}/archive/` (202
`{detail}`) | `startOrganizationPreprodSnapshotArchive` | **true** |

The two archive operations are marked experimental
(`PUBLIC_EXPERIMENTAL` in sentry). They still move, and the planned lint
rule will warn on them.

Behavior is unchanged:
- The CLI's valibot schemas still validate each response
(`BuildAssembleResponseSchema`, which also reads `detail` on error
states, `CreateSnapshotResponseSchema` and
`SnapshotArchiveStatusSchema`). Error messages, 401/403 enrichment and
org region routing (`getOrgSdkConfig`) are the same.
- Snapshot create is still zstd-compressed with `Content-Encoding:
zstd`, and still falls back to plain JSON when the runtime lacks zstd.
That was the only user of the `bodyEncoding` option on
`apiRequestToRegion`, so this PR removes the option.
- Chunk uploads still go to the org region from `resolveOrgRegion`. Only
the assemble call moved.
- The build and snapshot request bodies are now typed from the schema
instead of `Record<string, unknown>`. `vcsInfoToBody` returns a new
`VcsBody` type, and `snapshots upload` builds a typed
`SnapshotManifest`.

### Question for the reviewer: assemble transport retries

The CLI still lets the transport retry the assemble POST, through
`getOrgSdkConfig({ idempotent: true })`, as it did before this PR.
Sentry now declares the opposite: the endpoint sets `idempotent_methods
= frozenset()`, with a comment that a resend after the build leaves the
uploading state creates another build, and the 1.51 docs say not to
resend a request that succeeded.

Server-side, `create_preprod_artifact` does `get_or_create(...,
state=UPLOADING)`, so a resend that arrives while the build is still
uploading reuses the same row. The poll loop returns as soon as it gets
`artifactUrl`, so polling never re-sends after creation. The only risk
is a transport retry after a lost response that lands once assembly has
moved the build out of `UPLOADING`.

I kept the retry so behavior doesn't change in this PR. Dropping it is a
one-line change (`getOrgSdkConfig()`) if you'd rather follow Sentry's
declaration.

### Still on the helpers

| Call site | Endpoint | Waiting on |
| --- | --- | --- |
| `projects.ts` dsn-lookup | `GET /organizations/{org}/dsn-lookup/` |
getsentry/sentry#130367 |
| `auth.ts` | `GET /api/0/` (control silo) | getsentry/sentry#130369 |
| `users.ts` | `GET /auth/` → `GET /users/me/` | getsentry/sentry#130368
|
| `organizations.ts` | `GET /users/me/regions/` | #2091 replaces it with
`listOrganizations` |
| `traces.ts` / `logs.ts` | `GET
/projects/{org}/{project}/trace-items/{id}/` | sentry publish PR still
to come |
| `replays.ts` replay list | `GET /organizations/{org}/replays/` |
`replay list --json` prints `info_ids`/`warning_ids`, which the
generated `field` enum leaves out. Needs a sentry docs fix or a decision
|
| `projects.ts` | `GET /projects/?query=dsn:` fallback for old
self-hosted servers | not public; needs a decision (see #2093) |

These are the agreed exceptions: `trials.ts` (`/customers/*` and the
product-trial PUT), snapshot `upload-options` and archive `?download`,
`downloadBuildArtifact`'s install URL, chunk-upload server URLs, and
`rawApiRequest` for `sentry api`.

`apiRequestToRegionNoContent` has no callers in `src` after this PR.
It's still exported and used by `script/lib/source-api-usage.ts` and two
tests, so it'll be removed with the other helpers in the lint-rule PR.

### Testing

- `pnpm run tsc` and `pnpm run lint` pass. Generated docs and
`command-api.json` don't change.
- `pnpm run test` fails only on the 5 file-permission tests that also
fail on `main` in the sandbox (`completions` ×2, `upgrade`,
`db/resilient`, `dsn/code-scanner`), plus `@sentry/cli3to4`, whose
codemod binary needs GLIBC 2.35.
- `test/lib/api/preprod-artifacts.test.ts` now goes through the mocked
SDK fetch. It checks the method, URL and decoded body for assemble, the
zstd header and the decompressed manifest for snapshot create, the GET →
POST → GET sequence for the archive wait, and a new case where a failed
archive start throws `ApiError`. The `build` and `snapshots` command
tests pass unchanged.

<!-- junior-request-attribution:start -->
via @BYK.
<!-- junior-request-attribution:end -->

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:agent%3A80220b9d4c297e2a971f05dcb03af515 -->

--

[View
Session](https://junior-prod.sentry.dev/conversations/agent%3A80220b9d4c297e2a971f05dcb03af515)
[[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3A80220b9d4c297e2a971f05dcb03af515/?project=4510944073809921)

<!-- junior-session-footer:end -->

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
BYK added a commit to getsentry/toolkit that referenced this pull request Nov 9, 2026
…eveApiIndex (#2118)

Bumps `@sentry/api` from 1.53.0 to 1.55.0 and moves the CLI's `GET
/api/0/` call onto the generated `retrieveApiIndex` operation.
getsentry/sentry#130369 published that endpoint, and 1.55.0 ships it.

## Change

`getCurrentAuthScopes` (`packages/cli/src/lib/api/auth.ts`) feeds scope
recovery. It used to call the raw
`apiRequestToRegion(getControlSiloUrl(), "")` helper. It now calls
`retrieveApiIndex` with `getSdkClientConfig(getControlSiloUrl())`, then
`unwrapValidatedResult` with the same valibot schema. This is the same
pattern as `org-auth-tokens.ts`.

Behavior is unchanged:
- It still goes to the control silo URL. That's the configured server
URL on self-hosted, so self-hosted works as before.
- `auth: null` still returns `null`. Sentry sends that for anonymous
requests, session requests and requests with no token, and scope
recovery treats it as `invalid`.
- A 401 still comes back as an `ApiError` with `status: 401`. That's the
case `scope-recovery.ts` checks. CLI errors thrown by the fetch layer,
such as `AuthError`, still pass through `unwrapResult` unchanged.

With this change, the API discovery step in `typecheck` no longer
reports `auth.ts` as "not in the public catalog".

## Bump

- `pnpm-workspace.yaml`: the catalog and `minimumReleaseAgeExclude` both
move to `@sentry/api@1.55.0`.
- `pnpm-lock.yaml`: the `@sentry/api` entries move to 1.55.0 and its
integrity. 1.55.0 has the same dependencies and peer dependencies as
1.53.0.
- `pnpm install --no-frozen-lockfile` wouldn't rewrite these entries.
pnpm's lockfile age check rejected the old 1.53.0 entry before it
resolved anything, even with 1.53.0 temporarily excluded, so I edited
the entries by hand.
- `pnpm install --frozen-lockfile` passes on the result, age policy
check included.
- 1.54.0 and 1.55.0 cause no other type errors. Neither the CLI docs nor
the skill references changed when regenerated.

## Still waiting on sentry
- dsn-lookup: getsentry/sentry#130367
- `/auth/` → `GET /users/me/`, falling back to `/auth/` on a 403 from
older self-hosted servers: getsentry/sentry#130368
- trace items (`traces.ts`, logs): getsentry/sentry#130373
- After those, the no-allowlist Oxlint rule.

## Gate (local sandbox)
- `pnpm run tsc`: passes.
- `pnpm run lint`: passes.
- Tests:
- These all pass: mcp-core, mcp-cloudflare, mcp-test-client,
toolkit-core, logger, apps/local, apps/docs-mcp, apps/games-api and
apps/cli-docs.
- CLI: 12952 pass and 5 fail. All 5 are the known sandbox-only
permission cases: completions ×2, upgrade lock, resilient DB and the
code-scanner unreadable-file test.
- `@sentry/cli3to4` can't run here, because its `codemod` binary needs
GLIBC 2.35.
- `test/lib/api/auth.test.ts` now mocks `retrieveApiIndex` and covers
scopes, `auth: null`, and the 401.

No UI change, so no screenshots.

Part of the `@sentry/api` migration that started in #2073 (tracking
issue: getsentry/sentry#130351).

<!-- junior-request-attribution:start -->
via @BYK.
<!-- junior-request-attribution:end -->

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:agent%3A80220b9d4c297e2a971f05dcb03af515 -->

--

[View
Session](https://junior-prod.sentry.dev/conversations/agent%3A80220b9d4c297e2a971f05dcb03af515)
[[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3A80220b9d4c297e2a971f05dcb03af515/?project=4510944073809921)

<!-- junior-session-footer:end -->

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: Burak Yigit Kaya <126780+BYK@users.noreply.github.com>
@BYK
BYK merged commit 7a30dd4 into master Nov 9, 2026
78 of 79 checks passed
BYK added a commit to getsentry/toolkit that referenced this pull request Nov 9, 2026
… and trace item operations (#2132)

Bumps `@sentry/api` from 1.55.0 to 1.59.0, the newest version on npm.
Three CLI calls move from `apiRequestToRegion` onto the generated
operations. The endpoints they use were published in
getsentry/sentry#130367, #130368 and #130373.

### What moved
- **DSN lookup** (`projects.ts`) now uses `resolveOrganizationDsn`. A
404 still means "not here" when its detail is `DSN not found`/`Invalid
DSN`, and "this server can't look up DSNs" otherwise. The self-hosted
`/projects/?query=dsn:` fallback stays, and it still never runs on SaaS.
- **Current user** (`users.ts`) now reads `GET /users/me/` with
`retrieveUserDetails`. Servers older than getsentry/sentry#130368 return
403 there for every bearer token, so on a 403 it falls back to `/auth/`,
which returns the same body. Other errors still throw.
- **Trace item details** (`traces.ts`, used by `span view` and `log
view`) now use `retrieveProjectTraceItem`. The operation is marked
`experimental` in the `@sentry/api/operations` catalog.

The CLI keeps its valibot schemas (`DsnLookupResponseSchema`,
`SentryUserSchema`, `TraceItemDetailSchema`) on top of the generated
calls, so responses are validated the same way as before.

### Behavior change worth a look
A network failure during DSN lookup now comes back as the SDK's
`ApiError` (status 0, with the original error as `cause`), like every
other migrated call. Before, the raw error came through. The best-effort
lookup still reports it and moves on to the next org.
`api-client.multiregion.test.ts` asserts the new shape.

### Other changes
- The lockfile was edited by hand for the new version and integrity,
because pnpm's release-age check rejects the old entry. `pnpm install
--frozen-lockfile` passes. `@sentry/api`'s dependencies and peers are
the same as in 1.55.0.
- `alert.md` and `event.md` under `skills/sentry-cli/references` are
regenerated from the 1.59.0 schema descriptions.
- Comments that named `/auth/` as the user source now name `/users/me/`.

### Not in this PR
The leftover helpers and the no-allowlist Oxlint rule come separately.
The raw calls left are the agreed exceptions: `/customers/*` and the
product-trial PUT, snapshot `upload-options` and archive `?download`,
the replay list, the self-hosted `/projects/?query=dsn:` fallback, and
now the `/auth/` fallback.

### Testing
- `pnpm run tsc`: passes.
- `pnpm run lint`: 0 warnings, 0 errors.
- Tests: every package passes except 5 CLI tests that fail only in my
sandbox, because it can't enforce file permissions: completions ×2,
upgrade lock, `db/resilient` and `dsn/code-scanner`. `@sentry/cli3to4`
can't run there, because it needs GLIBC 2.35.
- New `getCurrentUser` tests cover `/users/me/` success, the 403
fallback to `/auth/`, and no fallback on 401.

<!-- junior-request-attribution:start -->
via @BYK.
<!-- junior-request-attribution:end -->

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:agent%3A80220b9d4c297e2a971f05dcb03af515 -->

--

[View
Session](https://junior-prod.sentry.dev/conversations/agent%3A80220b9d4c297e2a971f05dcb03af515)
[[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3A80220b9d4c297e2a971f05dcb03af515/?project=4510944073809921)

<!-- junior-session-footer:end -->

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: BYK <126780+BYK@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants