{"record":{"id":"ddfff7d08d948e3f","repo":"multica-ai/multica","slug":"list-issue-pull-requests-w","errorCode":null,"errorMessage":"list issue pull requests: %w","messagePattern":"list issue pull requests: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/cmd/multica/cmd_issue.go","lineNumber":760,"sourceCode":"}\n\nfunc runIssuePullRequests(cmd *cobra.Command, args []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\tissueRef, err := resolveIssueRef(ctx, client, args[0])\n\tif err != nil {\n\t\treturn fmt.Errorf(\"resolve issue: %w\", err)\n\t}\n\n\tvar result map[string]any\n\tif err := client.GetJSON(ctx, \"/api/issues/\"+url.PathEscape(issueRef.ID)+\"/pull-requests\", &result); err != nil {\n\t\treturn fmt.Errorf(\"list issue pull requests: %w\", err)\n\t}\n\n\toutput, _ := cmd.Flags().GetString(\"output\")\n\tif output == \"json\" {\n\t\treturn cli.PrintJSON(os.Stdout, result)\n\t}\n\n\tprs, _ := result[\"pull_requests\"].([]any)\n\tprintIssuePullRequestsTable(normalizePullRequestList(prs))\n\treturn nil\n}\n\nfunc normalizePullRequestList(raw []any) []map[string]any {\n\tprs := make([]map[string]any, 0, len(raw))\n\tfor _, item := range raw {\n\t\tpr, ok := item.(map[string]any)\n\t\tif !ok {\n\t\t\tcontinue","sourceCodeStart":742,"sourceCodeEnd":778,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_issue.go#L742-L778","documentation":"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.","triggerScenarios":"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.","commonSituations":"Dev server restarted mid-script; token expiry during a long-running batch; permission scope changes on private repos linked to the issue.","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."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"# retry only transport/5xx failures; surface 4xx immediately\n for i in 1 2 3; do\n   out=$(multica issue pull-requests \"$REF\" 2>&1) && break\n   case \"$out\" in *401*|*403*|*404*) echo \"$out\" >&2; exit 1;; esac\n   sleep $((i*2))\n done\n echo \"$out\"","preventionTips":["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."],"tags":["cli","network","http","pull-requests"],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}