{"record":{"id":"8812b62e48daab1e","repo":"multica-ai/multica","slug":"create-issue-w","errorCode":null,"errorMessage":"create issue: %w","messagePattern":"create issue: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/cmd/multica/cmd_issue.go","lineNumber":1193,"sourceCode":"\t}\n\n\t// Pre-validate attachments BEFORE creating the issue so a bad path can\n\t// never produce a half-created issue (which would otherwise trigger\n\t// callers — especially the agent doing quick-create — to retry the whole\n\t// `issue create` and end up with duplicates). URLs are warned+skipped, the\n\t// workdir guard is applied, and every local path is read upfront; a failure\n\t// here surfaces pre-create so the issue never lands.\n\tpending, err := collectLocalAttachments(cmd, attachments)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tvar result map[string]any\n\tif err := client.PostJSON(ctx, \"/api/issues\", body, &result); err != nil {\n\t\tif msg, ok := activeDuplicateIssueCreateMessage(err); ok {\n\t\t\treturn errors.New(msg)\n\t\t}\n\t\treturn fmt.Errorf(\"create issue: %w\", err)\n\t}\n\n\t// Upload attachments and link them to the newly created issue.\n\t// Failures here are partial-success: the issue exists already, so\n\t// turning a non-zero exit on the caller would invite a retry that\n\t// duplicates the issue. Warn on stderr and continue.\n\tissueID := strVal(result, \"id\")\n\tfor _, att := range pending {\n\t\tif _, uploadErr := client.UploadFile(ctx, att.data, att.path, issueID); uploadErr != nil {\n\t\t\tfmt.Fprintf(os.Stderr, \"warning: upload attachment %s failed (issue already created, %s): %v\\n\",\n\t\t\t\tatt.path, strVal(result, \"identifier\"), uploadErr)\n\t\t\tcontinue\n\t\t}\n\t\tfmt.Fprintf(os.Stderr, \"Uploaded %s\\n\", att.path)\n\t}\n\n\toutput, _ := cmd.Flags().GetString(\"output\")\n\tif output == \"table\" {","sourceCodeStart":1175,"sourceCodeEnd":1211,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_issue.go#L1175-L1211","documentation":"Error \"create issue: %w\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/cmd/multica/cmd_issue.go:1193 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the server response for details and retry creating the issue."],"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"}