Skip to content

fix(mcp): treat missing community listing as caller error - #1318

Merged
kody-bot merged 1 commit into
mainfrom
cursor/sentry-triage-kody-cloudflare-7660564819-51c1
Aug 8, 2026
Merged

kody-bot merged 1 commit into
mainfrom
cursor/sentry-triage-kody-cloudflare-7660564819-51c1

Conversation

@kentcdodds

@kentcdodds kentcdodds commented Aug 8, 2026 •

Copy link
Copy Markdown
Member

Intent

Stop routine community_get misses (missing/delisted listing ids) from opening Sentry platform-bug issues.

Summary

  • community_get now throws McpCallerError when the listing is not found (same message).
  • MCP observability already keeps McpCallerError on mcp-event and out of Sentry.
  • Fixes KODY-CLOUDFLARE-47.

Testing

  • packages/worker/src/mcp/capabilities/community/get.node.test.ts (missing listing → McpCallerError)
  • npm run validate
System recap — composes existing primitives (low risk)

Mode: recap · Base: main @ c6d9536a · Head: 1fffcaba

Classification: composes — wires existing McpCallerError classification into the community_get not-found path; no new primitives or schema changes.

Primitives touched

Primitive Group Impact
community-listings assistant composes — not-found uses McpCallerError
mcp-server surfaces composes — caller-error path for capability failures

System map

Missing/delisted listing ids classify as caller-fixable MCP failures instead of Sentry platform bugs.

Legend: green = composes (wiring only) · amber = extended by this PR · red = new primitive · gray = context (unchanged, included only when an edge crosses it).

flowchart LR
	communityListings["community-listings<br/>Community package listings"]:::touched
	mcpServer["mcp-server<br/>MCP endpoint"]:::touched
	communityListings -->|"throw McpCallerError on missing listing"| mcpServer
	classDef touched fill:#1a7f37,color:#fff
	classDef extended fill:#9a6700,color:#fff
	classDef added fill:#cf222e,color:#fff
	classDef untouched fill:#57606a,color:#fff
Loading
Open in Web Open in Cursor 

Summary by CodeRabbit

  • Bug Fixes
    • Improved error handling when a community listing is missing or delisted.
    • Users now receive a clear “Community listing not found.” message.

community_get threw a plain Error when listing_id was missing or
delisted, so routine agent lookups opened Sentry issues
(KODY-CLOUDFLARE-47). Use McpCallerError so they stay on mcp-event.

Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
@coderabbitai

coderabbitai Bot commented Aug 8, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: b2f850d5-fe04-4f0a-9510-1bc6719c6ef5

📥 Commits

Reviewing files that changed from the base of the PR and between c6d9536 and 1fffcab.

📒 Files selected for processing (2)
  • packages/worker/src/mcp/capabilities/community/get.node.test.ts
  • packages/worker/src/mcp/capabilities/community/get.ts

📝 Walkthrough

Walkthrough

The community get capability now throws McpCallerError when a listing is missing or delisted. New tests verify the error type and message with an authenticated MCP context.

Changes

Community get error handling

Layer / File(s) Summary
Typed missing-listing error and validation
packages/worker/src/mcp/capabilities/community/get.ts, packages/worker/src/mcp/capabilities/community/get.node.test.ts
community_get now throws McpCallerError with Community listing not found. for missing or delisted listings. Tests mock the listing service and verify this behavior.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: treating missing community listings as caller errors.
Description check ✅ Passed The description includes the required Intent, Summary, and Testing sections and explains the behavior change, observability impact, and validation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cursor/sentry-triage-kody-cloudflare-7660564819-51c1

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@kody-bot
kody-bot marked this pull request as ready for review August 8, 2026 15:13
@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

🔎 Preview deployed: https://kody-pr-1318.kody-a99.workers.dev

Worker: kody-pr-1318
D1: kody-pr-1318-db
KV: kody-pr-1318-oauth-kv

Mocks:

@kody-bot
kody-bot merged commit 6f86a70 into main Aug 8, 2026
17 checks passed
@kody-bot
kody-bot deleted the cursor/sentry-triage-kody-cloudflare-7660564819-51c1 branch August 8, 2026 15:22
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.

3 participants