Conversation
There was a problem hiding this comment.
Pull request overview
Improves skills/marketplace error reporting by propagating more specific error messages from the Electron main process through the skills store to the Skills UI.
Changes:
- Update skills store error mapping to fall back to normalized error messages when no known timeout/rate-limit translation key applies.
- Render non-translation search errors directly in the Skills marketplace UI.
- Return
Error.message(vsString(error)) from ClawHub IPC handlers and Host API skills routes for cleaner error payloads.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/stores/skills.ts |
Adjusts error-key mapping to return null for unknown codes and uses appError.message as fallback. |
src/pages/Skills/index.tsx |
Changes marketplace search error UI to display the raw error string when not a known translation key. |
electron/main/ipc-handlers.ts |
Updates ClawHub IPC handler error serialization to prefer error.message. |
electron/api/routes/skills.ts |
Updates Host API skills/clawhub route error serialization to prefer error.message. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
862
to
+864
| {SEARCH_ERROR_CODES.has(searchError.replace('Error: ', '')) | ||
| ? t(`toast.${searchError.replace('Error: ', '')}`, { path: skillsDirPath }) | ||
| : t('marketplace.searchError')} | ||
| : searchError} |
Comment on lines
30
to
32
| } catch (error) { | ||
| sendJson(res, 500, { success: false, error: String(error) }); | ||
| sendJson(res, 500, { success: false, error: error instanceof Error ? error.message : String(error) }); | ||
| } |
Comment on lines
174
to
+177
| const appError = normalizeAppError(error, { module: 'skills', operation: 'fetch' }); | ||
| const errorKey = mapErrorCodeToSkillErrorKey(appError.code, 'fetch'); | ||
| // Preserve previous skills on error (stale-while-revalidate). | ||
| set((prev) => ({ loading: false, error: mapErrorCodeToSkillErrorKey(appError.code, 'fetch'), skills: prev.skills })); | ||
| set((prev) => ({ loading: false, error: errorKey ?? appError.message, skills: prev.skills })); |
…kill routes and IPC handlers
823dedf to
166ab82
Compare
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
Related Issue(s)
Type of Change
Validation
Checklist