Skip to content

ref(cli): Bump @sentry/api to 1.59.0 and use dsn-lookup, user details and trace item operations - #2132

Merged
BYK merged 1 commit into
mainfrom
ref/cli-sentry-api-1.59
Nov 9, 2026
Merged

BYK merged 1 commit into
mainfrom
ref/cli-sentry-api-1.59

Conversation

@sentry-junior

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

Copy link
Copy Markdown
Contributor

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 feat(apidocs): Publish user details GET with token access 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.

via @BYK.

--

View Session [Sentry]

… and trace item operations

Bump @sentry/api from 1.55.0 to 1.59.0. Three CLI calls move from
apiRequestToRegion to the generated operations:

- DSN lookup uses resolveOrganizationDsn. The self-hosted
  /projects/?query=dsn: fallback stays.
- getCurrentUser reads GET /users/me/ with retrieveUserDetails. On a
  403, which servers older than getsentry/sentry#130368 return for every
  bearer token, it falls back to /auth/.
- Span and log item details use retrieveProjectTraceItem, which Sentry
  publishes as experimental.

The skill references are regenerated from the new schema descriptions.

Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
@vercel

vercel Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
sentry-local Ready Ready Preview Nov 9, 2026 11:25pm UTC

Request Review

@BYK
BYK enabled auto-merge (squash) November 9, 2026 23:32
@BYK
BYK merged commit 447a298 into main Nov 9, 2026
43 checks passed
@BYK
BYK deleted the ref/cli-sentry-api-1.59 branch November 9, 2026 23:37

This branch was successfully deployed

1 active deployment
Preview — 6e3dc367 Deployed Nov 9, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant