multica-ai/multica · error
list issues: %w
Error message
list issues: %w
What it means
The GET request to /api/issues (with the assembled query string) failed. The %w wraps the API client error, which can be transport-level (server unreachable, timeout), authentication (bad/expired token), or an HTTP error status returned by the server for the combination of query parameters. All flag validation has already passed by this point, so the failure is in the client→server leg.
Source
Thrown at server/cmd/multica/cmd_issue.go:675
}
// position (the manual board order) is always ascending, so the server
// ignores --direction for it. Reject the combination up front rather
// than silently dropping the flag — a passed-but-ignored flag is a
// footgun, especially in scripts.
if sortVal == "" || sortVal == "position" {
return fmt.Errorf("--direction requires --sort to be one of %s; position (the default manual board order) is always ascending", strings.Join(directionalIssueSortColumns, ", "))
}
params.Set("direction", d)
}
path := "/api/issues"
if len(params) > 0 {
path += "?" + params.Encode()
}
var result map[string]any
if err := client.GetJSON(ctx, path, &result); err != nil {
return fmt.Errorf("list issues: %w", err)
}
issuesRaw, _ := result["issues"].([]any)
output, _ := cmd.Flags().GetString("output")
if output == "json" {
total, _ := result["total"].(float64)
limit, _ := cmd.Flags().GetInt("limit")
offset, _ := cmd.Flags().GetInt("offset")
hasMore := offset+len(issuesRaw) < int(total)
wrapped := map[string]any{
"issues": issuesRaw,
"total": int(total),
"limit": limit,
"offset": offset,
"has_more": hasMore,
}
return cli.PrintJSON(os.Stdout, wrapped)View on GitHub (pinned to 2c0912b6ec)
Solutions
- Read the wrapped error — it distinguishes connection refused / timeout / HTTP status with body.
- Check the server is up and the CLI's configured base URL is correct (re-run any auth/setup command the CLI provides).
- If the status is 401/403, refresh the token or re-authenticate.
- If the status is 400, echo the query you built (the CLI encodes flags verbatim) and simplify filters to isolate the offending parameter.
- For transient network errors, retry after connectivity is restored.
Example fix
# before MULTICA_URL=https://wrong-host.example multica issue list # after MULTICA_URL=http://127.0.0.1:8080 multica issue list
Defensive patterns
Strategy: retry
Validate before calling
# cheap preflight before the real call
curl -sf -o /dev/null "$MULTICA_URL/api/issues?limit=1" \
|| { echo "server unreachable or unauthorized" >&2; exit 1; } Try / catch
# shell: retry only on transient-looking failures, never on 4xx input errors for i in 1 2 3; do out=$(multica issue list 2>&1) && break case "$out" in *"unauthorized"*|*"400"*) echo "$out" >&2; exit 1;; esac sleep $((i*2)) done echo "$out"
Prevention
- Pre-flight the server URL and token before batch runs.
- Distinguish 4xx (fix input/auth, don't retry) from 5xx/connection (retry with backoff).
- Log the wrapped error verbatim — it contains the HTTP status and body.
When it happens
Trigger: Running `multica issue list` when the Multica server is down or unreachable from the host; an expired or missing API token (newAPIClient succeeded but the request got 401); a 4xx/5xx from the server such as an invalid combination of server-side filters; DNS/TLS failures.
Common situations: CLI pointing at the wrong server URL (staged config); local dev server not running; token rotated since the CLI was configured; network policy blocking the host; server-side validation rejecting a filter value the CLI forwards verbatim (e.g. metadata filter).
Related errors
AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15).
Data as JSON: /api/errors/e92561aa65a4a91e.
Report an issue: GitHub.