{"record":{"id":"c8925e374a2078c6","repo":"multica-ai/multica","slug":"delete-comment-w","errorCode":null,"errorMessage":"delete comment: %w","messagePattern":"delete comment: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/cmd/multica/cmd_issue.go","lineNumber":2037,"sourceCode":"\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\nfunc runIssueCommentDelete(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\tif err := client.DeleteJSON(ctx, \"/api/comments/\"+args[0]); err != nil {\n\t\treturn fmt.Errorf(\"delete comment: %w\", err)\n\t}\n\n\tfmt.Fprintf(os.Stderr, \"Comment %s deleted.\\n\", args[0])\n\treturn nil\n}\n\nfunc runIssueCommentResolve(cmd *cobra.Command, args []string) error {\n\treturn runIssueCommentResolution(cmd, args[0], true)\n}\n\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","sourceCodeStart":2019,"sourceCodeEnd":2055,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_issue.go#L2019-L2055","documentation":"`multica issue comment delete <comment-id>` issues DELETE /api/comments/{id}. This error wraps any failure: comment not found, already deleted, no permission, or transport/auth errors, with the cause preserved.","triggerScenarios":"Passing a wrong or truncated comment ID; deleting a comment that was already removed; lacking delete rights in the workspace; server unreachable.","commonSituations":"IDs copied without the full prefix; scripts double-running and hitting the second delete; expired token.","solutions":["Confirm the comment ID via `multica issue comment list <issue>`.","If already deleted, treat as success in idempotent scripts.","Verify permissions and auth for 401/403 responses."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"# bash: confirm the comment exists before deleting\nmultica issue comment list \"$ISSUE\" --output json | jq -e --arg c \"$CID\" 'any(.[]; .id == $c)' >/dev/null \\\n  || { echo \"no such comment: $CID\" >&2; exit 2; }","typeGuard":null,"tryCatchPattern":"# bash: treat 'not found' as idempotent success in automation\nmultica issue comment delete \"$CID\" 2>/tmp/err || {\n  grep -q '404\\|not found' /tmp/err && exit 0\n  cat /tmp/err >&2; exit 1;\n}","preventionTips":["Copy full comment IDs from list output.","Make deletion scripts idempotent by swallowing not-found outcomes."],"tags":["cli","http","api-client","comments","delete"],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}