whoami returns a bare HTTP 400 when the token has no user behind it (org auth tokens)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 75/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- api, authentication
Direzione di ricerca
Leggi packages/mcp-core/src/internal/error-handling.ts e segui come whoami gestisce una risposta 400 da /auth/. Aggiorna l’errore mostrato in questo caso per spiegare che al token non è associato alcun utente e consigliare un token personale o OAuth. Il lavoro è completato quando l’errore fornisce queste indicazioni e la gestione generica esistente rimane adatta agli altri errori; l’issue non indica alcun file di test.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
An agent connected to the hosted MCP with a direct Sentry-Bearer token got 403s naming org:read on find_organizations and find_projects and event:read on search_issues, and then whoami failed with a bare HTTP 400 Bad Request. It concluded the token "has no usable scopes" and stopped. Reported through submit_feedback_to_sentry_team (MCP 0.42.0).
Likely token type (inference: we can't see the token). These failures fit an org auth token (sntrys_...):
- Org auth tokens carry only
org:ci. It's the only allowed scope (sentrysrc/sentry/models/orgauthtoken.py:32-36), so every read tool gets aninsufficient_scope403. Since getsentry/toolkit#2222, the MCP names the missing scopes correctly. - Org auth tokens authenticate with no user (
OrgAuthTokenAuthenticationpassesNoneas the user, sentrysrc/sentry/api/authentication.py:751-787).GET /api/0/auth/then returns a bodiless 400 whenrequest.userisn't authenticated (sentrysrc/sentry/api/endpoints/auth_index.py:63-65).
MCP gap. whoami passes that 400 through the generic Input Error template ("There was an HTTP 400 error... trying again", packages/mcp-core/src/internal/error-handling.ts). That message doesn't tell the agent the token isn't tied to a user, or that org auth tokens can't drive the MCP.
Fix. whoami should explain a 400 from /auth/: the token isn't tied to a user, org auth tokens only carry org:ci, so connect with a personal token or OAuth.
Possible follow-up, not in the fix: reject sntrys_ tokens up front in Sentry-Bearer mode, since no read tool can work with org:ci alone.
Reports: 1
via automation evt_905b9c478746fd9deeb853f85ad7441b · Run ID dispatch_d428b39c5339ad27cbfcee6c1a8f7e77.
--
- Lingua principale
- TypeScript
- Stelle
- 975
- Fork
- 189
- Merge medio
- 19h 57m
- PR unite (30g)
- 542
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di getsentry/toolkit
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
getsentry/toolkit#2583 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
getsentry/toolkit#2531 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
mcp-feedback-pattern
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
getsentry/toolkit#2458 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
getsentry/toolkit#2444 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
mcp-feedback-pattern
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
getsentry/toolkit#2362 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di getsentry/toolkit
Issue simili
-
sumHorizontal, maxHorizontal, minHorizontal, allHorizontal, anyHorizontal, struct and argSortBy treat strings as literals instead of column namesForse già presa @tomaionescu l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
pola-rs/nodejs-polars#486 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
jaegertracing/jaeger-ui#4853 ·
I maintainer di solito rispondono entro 1 giorno
-
area/plugins platform/linux reproduced type/bug version/v2
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
anomalyco/opencode#66970 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
area:tui enhancement platform:macos
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
anthropics/claude-code#112838 ·
-
Add: Sports First TV (US)Apertaapproved check:passed streams:add
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno