fix: improve publish dependency error messages#186
Merged
Conversation
…fix suggestions Dependency validation errors during roles:publish now name the role being published, list missing deps as comma-separated text instead of JSON arrays, and suggest publishing missing deps first. Applied to both publish and publishInternal mutations. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
juhgiyo
added a commit
that referenced
this pull request
Apr 10, 2026
Convex strips plain Error messages from client-facing mutations as a security feature. The improved error messages from PR #186 were invisible to web UI users because throwIfDepErrors and the publish mutation used throw new Error(). Changed to throw new ConvexError() so messages pass through to the client. The CLI path (httpAction -> publishInternal) is unaffected since httpAction catches e.message which works for both types. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
4 tasks
juhgiyo
added a commit
that referenced
this pull request
Apr 10, 2026
## Summary - **Bug fix**: Convex strips plain `Error` messages from client-facing mutations as a security feature, so the improved error messages from PR #186 were invisible to web UI users (they saw generic "Server Error" instead) - Changed 8 `throw new Error()` → `throw new ConvexError()` in `convex/roles.ts`: the `throwIfDepErrors` helper and all error throws in the `publish` mutation (auth, ownership, deletion, version checks) - `publishInternal` (internal mutation) left unchanged — its errors are caught by the httpAction which accesses `e.message` directly ## Test plan - [x] 266/266 tests pass - [x] TypeScript compiles cleanly (`tsc --noEmit`) - [x] Verified `ConvexError(string).message === string` (httpAction catch blocks still work) - [ ] Manual: publish a role with a missing dependency via web UI → should see the full error message instead of "Server Error" ## Follow-up (out of scope) - `softDelete` and `restore` mutations in `convex/roles.ts` have the same bug (plain `Error` in client-facing mutations) - `convex/skills.ts`, `convex/agents.ts`, `convex/integrations.ts`, `convex/memories.ts` have the same pattern 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
publishandpublishInternalmutations to include the role being published, list missing deps as comma-separated text (not JSON arrays), and add actionable fix suggestionsthrowIfDepErrorshelper functionBefore:
Dependency role(s) not found in registry: ["code-reviewer","qa-engineer"]After:
Failed to publish role 'implementer': Dependency role(s) not found in registry: code-reviewer, qa-engineer. Publish these roles first, then retry publishing 'implementer'Test plan
publishInternalandpublishmutations use the shared helper🤖 Generated with Claude Code