{"record":{"id":"092ca7d59ccc509a","repo":"hasura/graphql-engine","slug":"setting-up-codegen-assets-repo-failed-this-is-req","errorCode":null,"errorMessage":"setting up codegen-assets repo failed (this is required for automatically generating actions code): %w","messagePattern":"setting up codegen-assets repo failed \\(this is required for automatically generating actions code\\): %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/commands/actions_codegen.go","lineNumber":46,"sourceCode":"  hasura actions codegen\n\n  # Generate code for an Action\n  hasura actions codegen [action-name]\n\n  # Generate code for two or more Actions\n  hasura actions codegen [action-name] [action-name...]\n\n  # Derive an Action from a Hasura operation\n  hasura actions codegen [action-name] --derive-from \"\"`,\n\t\tSilenceUsage: true,\n\t\tPreRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\top := genOpName(cmd, \"PreRunE\")\n\n\t\t\terr := ec.SetupCodegenAssetsRepo()\n\t\t\tif err != nil {\n\t\t\t\treturn errors.E(\n\t\t\t\t\top,\n\t\t\t\t\tfmt.Errorf(\n\t\t\t\t\t\t\"setting up codegen-assets repo failed (this is required for automatically generating actions code): %w\",\n\t\t\t\t\t\terr,\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t}\n\t\t\t// ensure codegen-assets repo exists\n\t\t\terr = ec.CodegenAssetsRepo.EnsureCloned()\n\t\t\tif err != nil {\n\t\t\t\treturn errors.E(\n\t\t\t\t\top,\n\t\t\t\t\tfmt.Errorf(\n\t\t\t\t\t\t\"pulling latest actions codegen files from internet failed: %w\",\n\t\t\t\t\t\terr,\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t}\n\n\t\t\treturn nil","sourceCodeStart":28,"sourceCodeEnd":64,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/cli/commands/actions_codegen.go#L28-L64","documentation":"Wrapped variant for errors from scalar type resolution (scalar_types module), surfaced transparently with the inner error's message. It fires when resolving a scalar type definition itself fails (e.g. unknown underlying type representation or invalid scalar config).","triggerScenarios":"Declaring a scalar type whose definition fails scalar resolution — such as referencing an unknown comparison operator type, an invalid type representation for a data connector, or a malformed aggregate/compare config — during metadata resolution.","commonSituations":"Defining custom scalars with unsupported representations per data connector; version skew between metadata format and resolver; copying scalar definitions from another connector type without adjusting them.","solutions":["Read the inner ScalarTypesError message to identify the exact scalar problem","Fix or simplify the scalar type definition (logic/comparison/aggregate config)","Check that the chosen representation is supported by the scalar's data connector"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"match resolve(&md) {\n    Err(ResolveError::ScalarTypesError(inner)) => {\n        eprintln!(\"scalar resolution failed: {inner}\");\n        fix_scalar_definition(&inner);\n    }\n    r => r,\n}","preventionTips":["Use only representations documented as supported by the scalar's data connector","Test each custom scalar in isolation when adding new connector types"],"tags":["metadata","scalar-types","validation"],"backgroundTag":"scalar-type-resolution-failed","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}