{"record":{"id":"29a00da58cd4eab0","repo":"multica-ai/multica","slug":"list-skills-w","errorCode":null,"errorMessage":"list skills: %w","messagePattern":"list skills: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/cmd/multica/cmd_skill.go","lineNumber":242,"sourceCode":"\t}\n\tif !utf8.Valid(data) {\n\t\treturn \"\", false, fmt.Errorf(\"%s must be valid UTF-8\", label)\n\t}\n\treturn string(data), true, nil\n}\n\nfunc runSkillList(cmd *cobra.Command, _ []string) error {\n\tclient, err := newAPIClient(cmd)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tctx, cancel := cli.APIContext(context.Background())\n\tdefer cancel()\n\n\tvar skills []map[string]any\n\tif err := client.GetJSON(ctx, \"/api/skills\", &skills); err != nil {\n\t\treturn fmt.Errorf(\"list skills: %w\", err)\n\t}\n\n\toutput, _ := cmd.Flags().GetString(\"output\")\n\tif output == \"json\" {\n\t\treturn cli.PrintJSON(os.Stdout, skills)\n\t}\n\n\theaders := []string{\"ID\", \"NAME\", \"DESCRIPTION\", \"CREATED_AT\"}\n\trows := make([][]string, 0, len(skills))\n\tfor _, s := range skills {\n\t\trows = append(rows, []string{\n\t\t\tstrVal(s, \"id\"),\n\t\t\tstrVal(s, \"name\"),\n\t\t\tstrVal(s, \"description\"),\n\t\t\tstrVal(s, \"created_at\"),\n\t\t})\n\t}\n\tcli.PrintTable(os.Stdout, headers, rows)","sourceCodeStart":224,"sourceCodeEnd":260,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_skill.go#L224-L260","documentation":"Returned by `multica skill list` when the HTTP GET /api/skills via client.GetJSON fails. The %w wraps transport- or server-level failures: unreachable server, auth rejection, non-2xx status, or a response body that is not valid JSON. NewAPIClient errors (no config/token) surface earlier with their own message.","triggerScenarios":"Running `multica skill list` when the daemon/server at the configured server_url is down, the token expired or was revoked, DNS fails, or the server returns a 5xx or HTML error page instead of the skills array.","commonSituations":"Self-hosted server stopped or behind a misconfigured reverse proxy; token invalidated after a server reinstall; profile pointing at the wrong server_url; TLS certificate issues.","solutions":["Check connectivity/auth first: `multica auth status` and `multica daemon status` for the active profile.","Read the wrapped error — 401/403 means re-authenticate (`multica login`), connection refused means the server is down.","Verify server_url in the profile config matches a running deployment.","Retry once transient network conditions clear; for self-hosted, check the reverse proxy and server logs."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"# Pre-flight the API the CLI will hit\nserver_url=$(multica config show --output json | jq -r .server_url)\ncurl -fsS -o /dev/null \"$server_url/api/skills\" || echo \"API unreachable or unauthorized\"","typeGuard":null,"tryCatchPattern":"Branch on the wrapped cause: auth errors → run `multica login` and stop; connection errors → retry with backoff; 5xx → retry later; other 4xx → report server message unchanged.","preventionTips":["Run `multica auth status` before skill commands in scripts.","Monitor self-hosted server/proxy health.","Keep profiles pinned to known-good server URLs."],"tags":["go","cli","network","http","auth","skills"],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}