Repository navigation
fix(jobs): keep missing job id lookups out of Sentry - #961
Conversation
job_get/update/delete/run_now threw plain Error for caller-supplied ids that do not resolve, so agent typos and stale ids opened Sentry issues that look like platform bugs (KODY-CLOUDFLARE-2B). Throw McpCallerError so MCP observability keeps them on mcp-event logs only. Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughJob service endpoints now classify missing job references as ChangesJob error classification
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
|
🔎 Preview deployed: https://kody-pr-961.kody-a99.workers.dev Worker: Mocks:
|
Summary
job_get(and sibling job mutate paths) threw a plainErrorwhen a caller-supplied job id did not resolve for the signed-in user. Agents routinely hit this with stale or typo’d ids; MCP observability then opened Sentry issues that look like platform bugs (KODY-CLOUDFLARE-2B).Throw
McpCallerErrorinstead so the established caller-error carve-out keeps these onmcp-eventlogs only. MCP response messages are unchanged.Changes
getJob,updateJob,deleteJob, andrunJobNowthrowMcpCallerErrorfor missing job idsTest plan
McpCallerErrorpathsnpm run validate/ CISystem recap — composes existing primitives (low risk)
Mode: recap · Base:
main· Head:cursor/sentry-triage-kody-cloudflare-2b-a6daClassification: composes — reuses existing
McpCallerErroron job not-found paths; no new primitives or API shape changes.Primitives touched
jobsSystem map
Missing job ids from MCP job capabilities now fail as caller errors so Sentry stays quiet.
Legend: green = composes (wiring only) · amber = extended by this PR · red = new primitive · gray = context (unchanged, included only when an edge crosses it).
Before / after
Error→ Sentry issueMcpCallerError→ mcp-event onlySummary by CodeRabbit