Dashboard › cli › Distillation
a3801552-981e-40d3-ad80-de491e48af2e["lore_tm_v1_MUiVTrGet48y_pH8aWBsfJRBt2rmfGmk2CO427k933s","lore_tm_v1_-xJkz4GjRtFm53SOcBWUh9078kc92pCIMCR7hqd3lPo","lore_tm_v1_iUya0ZTTAsZHgSTznhRJGrjESBlhHqkz1RLu1J1hgAM","lore_tm_v1_OH8KGec6pwAG75l8khESCxbQTaeJZcOCiDw9fmy8lLc","lore_tm_v1_L2hh_9Ey1OHnqfLUEpQtkUyjvLIGYT7B4b4tWVk5aW0","lore_tm_v1_i3FzsUMlU3P3igVhfbpczZe7pYjerXECogRE3wFV_Hk"]
Date: Sep 10, 2026
test.poolOptions was removed and previous poolOptions must be top-level options.SENTRY_AUTH_TOKEN was detected but stored OAuth login remained active unless SENTRY_FORCE_ENV_TOKEN=1; stored credentials were migrated to host-scoped entries for https://legacy-configured.example.com and https://sentry.io.resetTrustedRegionUrlsForTesting() in packages/cli/src/lib/db/regions.ts now clears seededSourceOrigins rather than obsolete trustedRegionOriginsSeeded.resolveOrgRegion(orgSlug) now obtains baseUrl = getApiBaseUrl(), keys its promise cache as ${baseUrl}\0${orgSlug}, and falls back to the base API URL when resolution fails, preventing cached region resolution from being reused across active API origins.normalizeNumericOrg(orgId) now passes getApiBaseUrl() as the provenance argument to getOrgByNumericId(orgId, baseUrl).packages/cli/src/lib/sentry-client.ts, including isRedirect(response) for status codes 301, 302, 303, 307, and 308; validation that redirects contain a valid Location header; redirect request-method handling; redirect-limit handling; and mutable request-header handling across retries/redirects.getRedirectRequest() changes a non-GET/non-HEAD request to GET on 303, and changes POST to GET on 301 or 302; otherwise it retains the original request semantics via new Request(destination, request).never forwards a refresh token to a cross-origin redirect, covering a 307 redirect.claim URL routes requests when no explicit URL is configured and forced env token never uses a region cached for stored OAuth; the latter expects safe failure matching /Unexpected response format from organizations\/cached-org\/chunk-upload\//i.packages/cli/src/lib/complete.ts lines 190 and 295; packages/cli/src/lib/api/projects.ts lines 77 and 575; packages/cli/src/lib/api/organizations.ts line 109; packages/cli/src/lib/org-list.ts line 1054; packages/cli/src/commands/project/delete.ts line 71; packages/cli/src/commands/org/list.ts line 144; and cache APIs in packages/cli/src/lib/db/regions.ts including getAllOrgRegions() line 304, getCachedOrganizations() line 343, and getCachedOrgRole(orgSlug) line 377.apiRequestToRegion always sends JSON and sets Content-Type explicitly.packages/cli/src/lib/sentry-client.ts documentation specifies prepareHeaders() sets only Authorization and User-Agent; it deliberately does not set Content-Type, because SDK callers set their own, apiRequestToRegion explicitly sends JSON, and rawApiRequest may require no content type for bodies such as strings.prepareHeaders(input, init, token) preserves source request headers when the SDK invokes fetch(request) without init, preventing Node.js fetch(request, {headers}) semantics from stripping SDK-set Content-Type and causing HTTP 415 errors. It intentionally shares and mutates the returned Headers across retries so handleUnauthorized() can replace Authorization and set RETRY_MARKER_HEADER.prepareHeaders() defense-in-depth checks isRequestOriginTrusted(input) and throws HostScopeError("Credentials", normalizeOrigin(input) ?? "<unknown host>", getActiveTokenHost()) for an untrusted request origin; it also validates an sntrys_ tokenβs parsed url claim through isHostTrustedForClaim(input, claimUrl) and throws HostScopeError on a mismatch.prepareHeaders() applies telemetry sentry-trace and baggage headers from getTraceData() when available, then scopes user-configured proxy/IAP/mTLS custom headers through applyCustomHeaders(headers, input).handleUnauthorized(headers) refuses a second refresh when RETRY_MARKER_HEADER exists; otherwise it runs refreshToken({ force: true }), updates Authorization and adds retry marker "1" only when { refreshed: true }, and logs token-refresh failures at debug level.