multica-ai/multica · error
list comments: %w
Error message
list comments: %w
What it means
This is the wrapped failure from the GET /api/issues/{id}/comments call made by `multica issue comment list`. The underlying error comes from the HTTP client (connection refused, 401/403 auth failure, 404 unknown issue, 5xx, timeout) and is chained with %w so the cause stays visible.
Source
Thrown at server/cmd/multica/cmd_issue.go:1897
params.Set("tail", fmt.Sprintf("%d", tail))
}
if recentSet {
params.Set("recent", fmt.Sprintf("%d", recent))
}
if before != "" {
params.Set("before", before)
params.Set("before_id", beforeID)
}
path := "/api/issues/" + issueRef.ID + "/comments"
if len(params) > 0 {
path += "?" + params.Encode()
}
var comments []map[string]any
respHeaders, err := client.GetJSONWithHeaders(ctx, path, &comments)
if err != nil {
return fmt.Errorf("list comments: %w", err)
}
// The server emits the next-page cursor in headers when there is likely
// an older page. Surface it on stderr so an operator (and the agent
// prompt update that follows this PR) can scroll deeper without having
// to dig into the raw HTTP response. Label depends on which paging mode
// the caller is in — under --recent the cursor is a thread cursor;
// under --thread + --tail it is a reply cursor inside that thread.
if nb := respHeaders.Get("X-Multica-Next-Before"); nb != "" {
if nbid := respHeaders.Get("X-Multica-Next-Before-Id"); nbid != "" {
label := "Next thread cursor"
if thread != "" && tailSet {
label = "Next reply cursor"
}
fmt.Fprintf(os.Stderr, "%s: --before %s --before-id %s\n", label, nb, nbid)
}
}
output, _ := cmd.Flags().GetString("output")View on GitHub (pinned to 2c0912b6ec)
Solutions
- Verify the server is up and the CLI targets the right base URL (multica config).
- Re-authenticate / refresh the API token.
- Confirm the issue ID exists and you have access to its workspace.
- Retry once the server or network recovers; check server logs if 5xx persists.
Defensive patterns
Strategy: retry
Validate before calling
# bash: pre-flight before listing comments
multica health >/dev/null 2>&1 || { echo "server unreachable" >&2; exit 2; }
multica issue get "$ISSUE" >/dev/null 2>&1 || { echo "issue unresolved" >&2; exit 2; } Try / catch
# bash: distinguish transient from permanent failures
out=$(multica issue comment list "$ISSUE" 2>&1)
if [[ $? -ne 0 ]]; then
if grep -qE 'connection refused|timeout|50[0-3]' <<<"$out"; then
sleep 2; out=$(multica issue comment list "$ISSUE" 2>&1) || { echo "$out" >&2; exit 1; }
else
echo "$out" >&2; exit 1
fi
fi Prevention
- Run a health/get pre-flight before batch comment listings.
- Keep the CLI config's base URL and token fresh; wrap batch jobs with one retry on transient errors.
When it happens
Trigger: The multica server is not running or unreachable; the API token is missing/expired; the issue reference resolves but the comments endpoint returns 4xx/5xx; the request exceeds the API timeout.
Common situations: Pointing the CLI at a stale server URL in config; expired session token; network/VPN issues; server restarted mid-session.
Related errors
AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15).
Data as JSON: /api/errors/ab8a79bc822ce964.
Report an issue: GitHub.