{"record":{"id":"9ef32e21e6ac0b19","repo":"multica-ai/multica","slug":"type-is-required","errorCode":null,"errorMessage":"--type is required","messagePattern":"--type is required","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/cmd/multica/cmd_project.go","lineNumber":577,"sourceCode":"\t\tif !ok {\n\t\t\tcontinue\n\t\t}\n\t\trows = append(rows, []string{\n\t\t\tdisplayID(strVal(r, \"id\"), fullID),\n\t\t\tstrVal(r, \"resource_type\"),\n\t\t\tsummarizeResourceRef(r[\"resource_ref\"]),\n\t\t\tstrVal(r, \"label\"),\n\t\t})\n\t}\n\tcli.PrintTable(os.Stdout, headers, rows)\n\treturn nil\n}\n\nfunc runProjectResourceAdd(cmd *cobra.Command, args []string) error {\n\tresourceType, _ := cmd.Flags().GetString(\"type\")\n\tresourceType = strings.TrimSpace(resourceType)\n\tif resourceType == \"\" {\n\t\treturn fmt.Errorf(\"--type is required\")\n\t}\n\n\tbody := map[string]any{\"resource_type\": resourceType}\n\n\t// --ref takes precedence when it is JSON: any new resource type works\n\t// through that path without a CLI change. For github_repo only, a non-JSON\n\t// --ref is a checkout ref shortcut and merges with --url.\n\tif ref, ok, err := buildResourceRefFromRefFlag(cmd, resourceType, nil); err != nil {\n\t\treturn err\n\t} else if ok {\n\t\tbody[\"resource_ref\"] = ref\n\t} else {\n\t\tswitch resourceType {\n\t\tcase \"github_repo\":\n\t\t\tref, has, err := buildResourceRefFromFlags(cmd, resourceType, nil)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}","sourceCodeStart":559,"sourceCodeEnd":595,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_project.go#L559-L595","documentation":"Error \"--type is required\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/cmd/multica/cmd_project.go:577 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass --type with the resource type (e.g. github_repo, local_directory)."],"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"}