{"record":{"id":"b87d0b966d2d9e00","repo":"multica-ai/multica","slug":"cancel-task-w","errorCode":null,"errorMessage":"cancel task: %w","messagePattern":"cancel task: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/cmd/multica/cmd_issue.go","lineNumber":2304,"sourceCode":"\tdefer cancel()\n\n\tissueScope := \"\"\n\tif issueInput, _ := cmd.Flags().GetString(\"issue\"); issueInput != \"\" {\n\t\tissueRef, err := resolveIssueRef(ctx, client, issueInput)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"resolve issue: %w\", err)\n\t\t}\n\t\tissueScope = issueRef.ID\n\t}\n\ttaskRef, err := resolveTaskRunID(ctx, client, issueScope, args[0])\n\tif err != nil {\n\t\treturn fmt.Errorf(\"resolve task run: %w\", err)\n\t}\n\n\tvar result map[string]any\n\tpath := \"/api/tasks/\" + url.PathEscape(taskRef.ID) + \"/cancel\"\n\tif err := client.PostJSON(ctx, path, map[string]any{}, &result); err != nil {\n\t\treturn fmt.Errorf(\"cancel task: %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\tstatus := strVal(result, \"status\")\n\tif status == \"\" {\n\t\tstatus = \"cancelled\"\n\t}\n\tfmt.Fprintf(os.Stdout, \"Task %s -> status=%s\\n\", taskRef.ID, status)\n\treturn nil\n}\n\nfunc runIssueSearch(cmd *cobra.Command, args []string) error {\n\tclient, err := newAPIClient(cmd)\n\tif err != nil {\n\t\treturn err","sourceCodeStart":2286,"sourceCodeEnd":2322,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_issue.go#L2286-L2322","documentation":"Error \"cancel task: %w\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/cmd/multica/cmd_issue.go:2304 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the task is still running before cancelling."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}