Repository navigation
fix(community): missing unpublish listing is a caller error (KODY-CLOUDFLARE-4N) - #1429
Conversation
unpublishCommunityListing threw a plain Error for missing or unowned listing ids, which MCP observability reported to Sentry as a platform bug (KODY-CLOUDFLARE-4N). Use CommunityActionError like the rest of the community surface so these stay on mcp-event lines 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)
📝 WalkthroughWalkthroughCommunity listing unpublish and fork operations now use ChangesCommunity action error consistency
Estimated code review effort: 2 (Simple) | ~10 minutes Mergeability Score: ⚪ Minimal · up to This localized change reclassifies missing or unowned listings as caller errors without changing the user-facing message or ownership behavior. No actionable merge-blocking risk remains beyond normal checks and review. Possibly related PRs
🚥 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-1429.kody-a99.workers.dev Worker: Mocks:
|
Sentry
Error: Community listing "<id>" was not found.unpublishCommunityListingviacommunity_unpublishmcp.capability=community_unpublish,mcp.failure_phase=handlerRoot cause
unpublishCommunityListingthrew a plainErrorwhen the listing id was missing or owned by someone else. MCP observability only suppressesCommunityActionError/McpCallerErrorfor caller-clearable failures, so a stale or mistypedlisting_idopened a Sentry issue that looked like a platform bug.Delisted listings already used
CommunityActionError; missing/unowned did not — an inconsistency with star/rate/trust paths in the same module.Fix
Throw
CommunityActionErrorfor missing/unowned (and post-delete race) cases inunpublishCommunityListing, and for missing listings inprepareCommunityFork(same message class). Callers still get the same actionable message; Sentry no longer receives these events.Verification
unpublishCommunityListing treats missing or unowned listings as CommunityActionErrorCommunityActionErroris not reported to SentrySystem recap — composes existing primitives (low risk)
Mode: recap · Base:
main@d2a56885· Head:948a6ba3Classification: composes — isolated bug fix; aligns missing-listing throws with the existing
CommunityActionErrorcaller-failure path already filtered by MCP observability.Primitives touched
community-listingsSystem map
Missing or unowned
listing_idon unpublish becomes a caller-clearableCommunityActionError, so MCP logs the failure without opening a Sentry issue.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
community_unpublishError→ Sentry issueCommunityActionError→ mcp-event onlyCommunityActionErrorInvariants
No change to ownership checks or per-user isolation; not-found still hides other owners' listings.
Summary by CodeRabbit