{"record":{"id":"9103009e1b74a4e7","repo":"multica-ai/multica","slug":"resolve-comment-w","errorCode":null,"errorMessage":"resolve comment: %w","messagePattern":"resolve comment: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/cmd/multica/cmd_issue.go","lineNumber":2065,"sourceCode":"\nfunc runIssueCommentUnresolve(cmd *cobra.Command, args []string) error {\n\treturn runIssueCommentResolution(cmd, args[0], false)\n}\n\nfunc runIssueCommentResolution(cmd *cobra.Command, commentID string, resolve bool) 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\tpath := \"/api/comments/\" + url.PathEscape(commentID) + \"/resolve\"\n\tvar result map[string]any\n\tif resolve {\n\t\tif err := client.PostJSON(ctx, path, nil, &result); err != nil {\n\t\t\treturn fmt.Errorf(\"resolve comment: %w\", err)\n\t\t}\n\t\tfmt.Fprintf(os.Stderr, \"Comment %s resolved.\\n\", commentID)\n\t} else {\n\t\tif err := client.DeleteJSONResponse(ctx, path, &result); err != nil {\n\t\t\treturn fmt.Errorf(\"unresolve comment: %w\", err)\n\t\t}\n\t\tfmt.Fprintf(os.Stderr, \"Comment %s unresolved.\\n\", commentID)\n\t}\n\n\toutput, _ := cmd.Flags().GetString(\"output\")\n\tif output == \"table\" {\n\t\treturn nil\n\t}\n\treturn cli.PrintJSON(os.Stdout, result)\n}\n\n// ---------------------------------------------------------------------------\n// Execution history commands","sourceCodeStart":2047,"sourceCodeEnd":2083,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_issue.go#L2047-L2083","documentation":"`multica issue comment resolve <comment-id>` POSTs to /api/comments/{id}/resolve. This error wraps a failed resolve call: comment not found, already resolved (depending on server semantics), lacking permission, or a transport error.","triggerScenarios":"Resolving a mistyped or deleted comment ID; resolving a comment in a workspace where you lack moderator rights; server/API unreachable.","commonSituations":"Thread-resolution automation hitting comments that were removed; stale IDs from an old listing; token expiry mid-batch.","solutions":["Verify the comment ID with `multica issue comment list`.","Check auth/permissions on 401/403.","Retry the resolve after transient failures."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"# bash: only resolve comments currently unresolved\nstate=$(multica issue comment list \"$ISSUE\" --output json | jq -r --arg c \"$CID\" '.[] | select(.id == $c) | .resolved')\n[[ \"$state\" == \"false\" ]] || { echo \"comment $CID not resolvable (state=$state)\" >&2; exit 2; }","typeGuard":null,"tryCatchPattern":"# bash: classify resolve failures\nmultica issue comment resolve \"$CID\" 2>/tmp/err || {\n  grep -qE '404|not found' /tmp/err && { echo \"already gone\"; exit 0; }\n  grep -qE '401|403' /tmp/err && { echo \"permission problem\" >&2; exit 2; }\n  cat /tmp/err >&2; exit 1;\n}","preventionTips":["Check resolved state from a fresh listing before batch resolves.","Guard moderation automation with permission pre-checks."],"tags":["cli","http","api-client","comments","resolve"],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}