{"record":{"id":"8fdedcfd280757a8","repo":"hasura/graphql-engine","slug":"error-in-marshalling-actions-custom-types-from-me","errorCode":null,"errorMessage":"error in marshalling actions, custom_types from metadata: %w","messagePattern":"error in marshalling actions, custom_types from metadata: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/internal/metadataobject/actions/actions.go","lineNumber":578,"sourceCode":"\tif err != nil {\n\t\treturn nil, errors.E(op, a.error(err))\n\t}\n\n\tactions := map[string]yaml.Node{}\n\tif v, ok := metadata[metadataobject.ActionsKey]; ok {\n\t\tactions[metadataobject.ActionsKey] = v\n\t}\n\n\tif v, ok := metadata[metadataobject.CustomTypesKey]; ok {\n\t\tactions[metadataobject.CustomTypesKey] = v\n\t}\n\n\tymlByt := new(bytes.Buffer)\n\tif err := metadataobject.GetEncoder(ymlByt).Encode(actions); err != nil {\n\t\treturn nil, errors.E(\n\t\t\top,\n\t\t\ta.error(\n\t\t\t\tfmt.Errorf(\"error in marshalling actions, custom_types from metadata: %w\", err),\n\t\t\t),\n\t\t)\n\t}\n\n\tvar common types.Common\n\n\terr = yaml.NewDecoder(ymlByt).Decode(&common)\n\tif err != nil {\n\t\treturn nil, errors.E(op, a.error(fmt.Errorf(\"error in unmarshal to common: %w\", err)))\n\t}\n\n\tvar sdlToReq types.SDLToRequest\n\n\tsdlToReq.Types = common.CustomTypes\n\tsdlToReq.Actions = common.Actions\n\n\tsdlToResp, err := a.cliExtensionConfig.ConvertMetadataToSDL(sdlToReq)\n\tif err != nil {","sourceCodeStart":560,"sourceCodeEnd":596,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/cli/internal/metadataobject/actions/actions.go#L560-L596","documentation":"Export fails when the actions metadata struct cannot be re-serialized to YAML. After Build produces the actions object, Export encodes it with the YAML encoder; a marshal failure means the in-memory struct contains data the encoder cannot represent.","triggerScenarios":"Calling Export() when the actions struct contains fields that cannot be YAML-encoded, such as unsupported map key types, NaN/Inf floats, or corrupted internal state after a partial build.","commonSituations":"Metadata loaded from an exotic or hand-edited YAML file that unmarshals into a degenerate struct; upstream schema changes introducing non-serializable fields.","solutions":["Inspect the actions metadata input for unusual values (non-string map keys, invalid types) and normalize them","Re-load and rebuild metadata from a known-good export","Report upstream if the struct itself fails to marshal with valid metadata"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"files, err := actionsObj.Export(ctx)\nif err != nil {\n  if strings.Contains(err.Error(), \"error in marshalling actions\") {\n    // inspect/normalize the source metadata, then retry with cleaned metadata\n  }\n  return err\n}","preventionTips":["Keep metadata within documented field types","Export from server-produced metadata as a known-good baseline"],"tags":["hasura","actions","yaml","serialization"],"backgroundTag":"yaml-marshaling-failed","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}