{"record":{"id":"22c8a56c1027e71a","repo":"multica-ai/multica","slug":"remove-project-resource-w","errorCode":null,"errorMessage":"remove project resource: %w","messagePattern":"remove project resource: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/cmd/multica/cmd_project.go","lineNumber":946,"sourceCode":"\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\tprojectRef, err := resolveProjectID(ctx, client, args[0])\n\tif err != nil {\n\t\treturn fmt.Errorf(\"resolve project: %w\", err)\n\t}\n\tresourceRef, err := resolveProjectResourceID(ctx, client, projectRef.ID, args[1])\n\tif err != nil {\n\t\treturn fmt.Errorf(\"resolve project resource: %w\", err)\n\t}\n\n\tif err := client.DeleteJSON(ctx, \"/api/projects/\"+projectRef.ID+\"/resources/\"+resourceRef.ID); err != nil {\n\t\treturn fmt.Errorf(\"remove project resource: %w\", err)\n\t}\n\n\tfmt.Fprintf(os.Stderr, \"Resource %s removed from project %s.\\n\", resourceRef.Display, projectRef.Display)\n\treturn nil\n}\n\n// summarizeResourceRef extracts the most useful single string from a\n// resource_ref object — for github_repo this is the URL; for\n// local_directory it is the local path.\nfunc summarizeResourceRef(raw any) string {\n\tm, ok := raw.(map[string]any)\n\tif !ok {\n\t\treturn \"\"\n\t}\n\tif u, ok := m[\"url\"].(string); ok && u != \"\" {\n\t\tif ref, ok := m[\"ref\"].(string); ok && strings.TrimSpace(ref) != \"\" {\n\t\t\treturn u + \" @ \" + strings.TrimSpace(ref)\n\t\t}","sourceCodeStart":928,"sourceCodeEnd":964,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_project.go#L928-L964","documentation":"Error \"remove project resource: %w\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/cmd/multica/cmd_project.go:946 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the resource exists and retry the removal."],"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"}