multica-ai/multica · error
list issue pull requests: %w
Error message
list issue pull requests: %w
What it means
The issue reference resolved fine, but the GET to /api/issues/{id}/pull-requests failed. The ID is URL-path-escaped before the call, so malformed IDs are not the cause; the failure is transport, auth, or an HTTP error status from the server on this specific sub-resource.
Source
Thrown at server/cmd/multica/cmd_issue.go:760
}
func runIssuePullRequests(cmd *cobra.Command, args []string) error {
client, err := newAPIClient(cmd)
if err != nil {
return err
}
ctx, cancel := cli.APIContext(context.Background())
defer cancel()
issueRef, err := resolveIssueRef(ctx, client, args[0])
if err != nil {
return fmt.Errorf("resolve issue: %w", err)
}
var result map[string]any
if err := client.GetJSON(ctx, "/api/issues/"+url.PathEscape(issueRef.ID)+"/pull-requests", &result); err != nil {
return fmt.Errorf("list issue pull requests: %w", err)
}
output, _ := cmd.Flags().GetString("output")
if output == "json" {
return cli.PrintJSON(os.Stdout, result)
}
prs, _ := result["pull_requests"].([]any)
printIssuePullRequestsTable(normalizePullRequestList(prs))
return nil
}
func normalizePullRequestList(raw []any) []map[string]any {
prs := make([]map[string]any, 0, len(raw))
for _, item := range raw {
pr, ok := item.(map[string]any)
if !ok {
continueView on GitHub (pinned to 2c0912b6ec)
Solutions
- Read the wrapped error for the HTTP status and response body.
- 401/403 → re-authenticate / verify the token's scope.
- 5xx or connection errors → verify server health and retry once it's up.
- Confirm the same ref works with `multica issue get <ref>`; if get succeeds but this fails, it's endpoint-specific (permissions or server bug) — report with the issue ID.
Defensive patterns
Strategy: retry
Try / catch
# retry only transport/5xx failures; surface 4xx immediately for i in 1 2 3; do out=$(multica issue pull-requests "$REF" 2>&1) && break case "$out" in *401*|*403*|*404*) echo "$out" >&2; exit 1;; esac sleep $((i*2)) done echo "$out"
Prevention
- Keep the server URL and token in one configured place so batch runs don't drift.
- Check endpoint-specific permissions when `issue get` works but this call fails.
When it happens
Trigger: Running `multica issue pull-requests <valid-ref>` when the server is unreachable, the token is expired (401), the user lacks permission to read the issue's PRs (403), or the server returns 5xx on this endpoint.
Common situations: Dev server restarted mid-script; token expiry during a long-running batch; permission scope changes on private repos linked to the issue.
Related errors
AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15).
Data as JSON: /api/errors/ddfff7d08d948e3f.
Report an issue: GitHub.