multica-ai/multica · error
search skills: %w
Error message
search skills: %w
What it means
Returned by `multica skill search` when GET `/api/skills/search?q=<query>` fails. The query is URL-escaped client-side, so encoding is not the issue; the wrapped cause is transport failure, timeout (60s budget covers the server's search/index work), auth rejection, or a server-side search error (e.g. index not built).
Source
Thrown at server/cmd/multica/cmd_skill.go:612
func runSkillSearch(cmd *cobra.Command, args []string) error {
client, err := newAPIClient(cmd)
if err != nil {
return err
}
query := strings.TrimSpace(args[0])
if query == "" {
return fmt.Errorf("query is required")
}
ctx, cancel := context.WithTimeout(context.Background(), cli.AtLeastAPITimeout(60*time.Second))
defer cancel()
var results []map[string]any
path := "/api/skills/search?q=" + url.QueryEscape(query)
if err := client.GetJSON(ctx, path, &results); err != nil {
return fmt.Errorf("search skills: %w", err)
}
output, _ := cmd.Flags().GetString("output")
if output == "json" {
return cli.PrintJSON(os.Stdout, results)
}
headers := []string{"NAME", "URL", "SOURCE", "INSTALLS", "DESCRIPTION"}
rows := make([][]string, 0, len(results))
for _, result := range results {
rows = append(rows, []string{
strVal(result, "name"),
strVal(result, "url"),
strVal(result, "source"),
strVal(result, "install_count"),
strVal(result, "description"),
})
}View on GitHub (pinned to 2c0912b6ec)
Solutions
- Verify basic API health with `multica skill list` — if that works, the failure is specific to search.
- Retry once; index warm-up and transient timeouts often clear immediately.
- Use a more specific query to reduce server-side search cost.
- If list works but every search 500s, check server logs for index-related errors.
Example fix
# before multica skill search a # times out over huge catalog # after multica skill list > /dev/null && multica skill search "ascii tables"
Defensive patterns
Strategy: retry
Validate before calling
multica skill list > /dev/null || exit 1 # pre-flight API reachability
[ "${#QUERY}" -ge 2 ] || { echo 'use a query of 2+ chars'; exit 1; } Try / catch
Retry once on timeout-shaped errors (cold index, transient load); do not retry 401/403 (fix auth) or persistent 500s (inspect server logs for the search index). Wrap the CLI call in a script, capture stderr, and branch on status keywords before deciding to retry.
Prevention
- Warm the API with a cheap call (skill list) before searching right after server start.
- Keep queries reasonably specific to bound server-side search cost.
- Reuse one authenticated session/context for repeated searches to avoid auth flakes.
When it happens
Trigger: Server down or wrong --api-url; auth token expired (401); search index cold or corrupted causing 500; extremely broad query (single common character) overloading the server until the context deadline expires.
Common situations: First search after server startup before the index warms; CLI configured for a stale environment; large skill catalog with a one-character query; transient network blip between CLI and server.
Related errors
AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15).
Data as JSON: /api/errors/e407445643a2d0a1.
Report an issue: GitHub.