Skip to content

fix(tools): Explain link_issue's installation 404 for integration tokens - #2296

Draft
sentry-junior[bot] wants to merge 1 commit into
mainfrom
fix/link-issue-app-token-installations-404
Draft

sentry-junior[bot] wants to merge 1 commit into
mainfrom
fix/link-issue-app-token-installations-404

Conversation

@sentry-junior

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

Copy link
Copy Markdown
Contributor

link_issue passes through Sentry's HTTP 404: "Could not find requested organization." when it lists Sentry App installations with an integration token. By then the tool has already read the issue in that org, so agents assume the issue reference is wrong and retry with other forms (MCP feedback MCP-SERVER-GQW).

Sentry only lists App installations for organization members. SentryAppInstallationsBaseEndpoint.convert_args raises this 404 when the caller has a user_id but no membership (src/sentry/sentry_apps/api/bases/sentryapps.py:416-422), and a Sentry App proxy user is never a member. In the reported call, the token was a direct Sentry-Bearer integration token: the issue read triggered app.find_installation_by_proxy_user, then the listing returned 404 (trace 1ef233a8…, span 858fccc96f0fe1d3).

Changes

  • A 404 from the installation listing in linkAppIssue now becomes a UserInputError. It says integration tokens get this 404, that linking App issues needs a user token or OAuth sign-in, and that a different issue ID or URL won't help. Other listing errors are unchanged.
  • docs/specs/issue-linking.md documents the case.

Related

via automation evt_905b9c478746fd9deeb853f85ad7441b · Run ID dispatch_6b056fcf1c2c5c748f43774a62ac1591.

--

View Session [Sentry]

Sentry answers GET /organizations/{org}/sentry-app-installations/ with
404 "Could not find requested organization" when the token's user is not
an org member, such as an internal integration's proxy user. link_issue
passed that through after it had already read the issue in the same org,
so agents retried with other issue ID and URL forms.

Translate that 404 into a UserInputError that says a user token or OAuth
sign-in is needed. Reported through MCP feedback MCP-SERVER-GQW.
@vercel

vercel Bot commented Nov 16, 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 16, 2026 4:12pm UTC

Request Review

This branch was successfully deployed

2 active deployments
Actions — d084bdc0 Deployed Nov 16, 2026 by sentry-junior[bot] via eval #1925
Preview — d084bdc0 Deployed Nov 16, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants