{"record":{"id":"163096eb99c226c4","repo":"hasura/graphql-engine","slug":"s-s","errorCode":null,"errorMessage":"%s: %s","messagePattern":"%s: %s","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/internal/metadataobject/actions/cli_extension/cli_extension.go","lineNumber":78,"sourceCode":"\t}\n\n\tsdlToCmd := exec.Command(*c.binPath)\n\targs := []string{\"sdl\", \"to\", \"--input-file\", inputFileName, \"--output-file\", outputFileName}\n\tsdlToCmd.Args = append(sdlToCmd.Args, args...)\n\n\tvar (\n\t\tstdout bytes.Buffer\n\t\tstderr bytes.Buffer\n\t)\n\n\tsdlToCmd.Stdout = &stdout\n\tsdlToCmd.Stderr = &stderr\n\terr = sdlToCmd.Run()\n\n\tc.logger.WithField(\"command\", \"sdl to\").Debug(\"output: \" + stdout.String())\n\n\tif err != nil {\n\t\treturn toResponse, errors.E(op, fmt.Errorf(\"%s: %s\", err.Error(), stderr.String()))\n\t}\n\n\ttmpByt, err := readCliExtOutput(outputFileName)\n\tif err != nil {\n\t\treturn toResponse, errors.E(op, err)\n\t}\n\n\terr = yaml.Unmarshal(tmpByt, &toResponse)\n\tif err != nil {\n\t\treturn toResponse, errors.E(op, errors.KindBadInput, err)\n\t}\n\n\treturn toResponse, nil\n}\n\n// ConvertSDLToMetadata converts graphql SDL to hasura metadata.\nfunc (c *Config) ConvertSDLToMetadata(\n\tfromPayload types.SDLFromRequest,","sourceCodeStart":60,"sourceCodeEnd":96,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/cli/internal/metadataobject/actions/cli_extension/cli_extension.go#L60-L96","documentation":"ConvertMetadataToSDL runs the cli-ext helper as a subprocess to turn actions/custom_types metadata into GraphQL SDL. This error means the subprocess returned a non-zero exit; the message combines the exec error with everything the process wrote to stderr.","triggerScenarios":"Calling ConvertMetadataToSDL (from Create or Export) when the cli-ext binary is missing, not executable, of an incompatible version, or when it rejects the request payload written to its temp file.","commonSituations":"Fresh machine without `hasura plugins install cli-ext`; plugin/CLI version mismatch; PATH problems in CI containers; metadata containing constructs the extension cannot parse.","solutions":["Read the stderr portion of the message — it states the actual extension failure","Install or update the plugin: `hasura plugins install cli-ext` / `hasura plugins update cli-ext`","Verify the cli-ext binary resolves on PATH (especially in CI) and is executable","Simplify the metadata payload to isolate content the extension rejects"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Pre-flight: subprocess binary must exist\nif _, err := exec.LookPath(\"cli-ext-hasura\"); err != nil {\n  // install plugin before proceeding\n}","typeGuard":null,"tryCatchPattern":"resp, err := ext.ConvertMetadataToSDL(req)\nif err != nil {\n  if strings.Contains(err.Error(), \":\") && isPluginMissing(err) { // parse stderr\n    installPlugin(); resp, err = ext.ConvertMetadataToSDL(req) // retry once\n  }\n}","preventionTips":["Pre-install cli-ext in Dockerfiles/CI","Log stderr from the wrapped error to diagnose content issues"],"tags":["hasura","cli-extension","subprocess","exec"],"backgroundTag":"cli-extension-subprocess-failed","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}