{"record":{"id":"8f5383904e627fed","repo":"caddyserver/caddy","slug":"requesting-ca-info-v","errorCode":null,"errorMessage":"requesting CA info: %v","messagePattern":"requesting CA info: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"modules/caddypki/command.go","lineNumber":213,"sourceCode":"\terr = truststore.Uninstall(rootCert,\n\t\ttruststore.WithDebug(),\n\t\ttruststore.WithFirefox(),\n\t\ttruststore.WithJava())\n\tif err != nil {\n\t\treturn caddy.ExitCodeFailedStartup, fmt.Errorf(\"failed to uninstall certificate file: %v\", err)\n\t}\n\n\treturn caddy.ExitCodeSuccess, nil\n}\n\n// rootCertFromAdmin makes the API request to fetch the root certificate for the named CA via admin API.\nfunc rootCertFromAdmin(adminAddr string, caID string) (*x509.Certificate, error) {\n\turi := path.Join(adminPKIEndpointBase, \"ca\", caID)\n\n\t// Make the request to fetch the CA info\n\tresp, err := caddycmd.AdminAPIRequest(adminAddr, http.MethodGet, uri, make(http.Header), nil)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"requesting CA info: %v\", err)\n\t}\n\tdefer resp.Body.Close()\n\n\t// Decode the response\n\tcaInfo := new(caInfo)\n\terr = json.NewDecoder(resp.Body).Decode(caInfo)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to decode JSON response: %v\", err)\n\t}\n\n\t// Decode the root cert\n\trootBlock, _ := pem.Decode([]byte(caInfo.RootCert))\n\tif rootBlock == nil {\n\t\treturn nil, fmt.Errorf(\"failed to decode root certificate: %v\", err)\n\t}\n\trootCert, err := x509.ParseCertificate(rootBlock.Bytes)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to parse root certificate: %v\", err)","sourceCodeStart":195,"sourceCodeEnd":231,"githubUrl":"https://github.com/caddyserver/caddy/blob/50e54ee279aa1e504fe218ca49ab6ae16c100410/modules/caddypki/command.go#L195-L231","documentation":"Error \"requesting CA info: %v\" thrown in caddyserver/caddy.","triggerScenarios":"Thrown at modules/caddypki/command.go:213 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the Caddy admin endpoint is reachable and the PKI app is configured, then retry."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"50e54ee279aa1e504fe218ca49ab6ae16c100410","analyzedAt":"2026-08-15T09:20:21.641Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}