{"record":{"id":"1f4a2744e29babca","repo":"caddyserver/caddy","slug":"sending-configuration-to-instance-v","errorCode":null,"errorMessage":"sending configuration to instance: %v","messagePattern":"sending configuration to instance: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/commandfuncs.go","lineNumber":408,"sourceCode":"\n\tadminAddr, err := DetermineAdminAPIAddress(addressFlag, config, configFile, configAdapterFlag)\n\tif err != nil {\n\t\treturn caddy.ExitCodeFailedStartup, fmt.Errorf(\"couldn't determine admin API address: %v\", err)\n\t}\n\n\t// optionally force a config reload\n\theaders := make(http.Header)\n\tif forceFlag {\n\t\theaders.Set(\"Cache-Control\", \"must-revalidate\")\n\t}\n\t// Provide the source file/adapter to the running process so it can\n\t// preserve its last-config knowledge if this reload came from the same source.\n\theaders.Set(\"Caddy-Config-Source-File\", configFile)\n\theaders.Set(\"Caddy-Config-Source-Adapter\", adapterUsed)\n\n\tresp, err := AdminAPIRequest(adminAddr, http.MethodPost, \"/load\", headers, bytes.NewReader(config))\n\tif err != nil {\n\t\treturn caddy.ExitCodeFailedStartup, fmt.Errorf(\"sending configuration to instance: %v\", err)\n\t}\n\tdefer resp.Body.Close()\n\n\treturn caddy.ExitCodeSuccess, nil\n}\n\nfunc cmdVersion(_ Flags) (int, error) {\n\t_, full := caddy.Version()\n\tfmt.Println(full)\n\treturn caddy.ExitCodeSuccess, nil\n}\n\nfunc cmdBuildInfo(_ Flags) (int, error) {\n\tbi, ok := debug.ReadBuildInfo()\n\tif !ok {\n\t\treturn caddy.ExitCodeFailedStartup, fmt.Errorf(\"no build information\")\n\t}\n\tfmt.Println(bi)","sourceCodeStart":390,"sourceCodeEnd":426,"githubUrl":"https://github.com/caddyserver/caddy/blob/50e54ee279aa1e504fe218ca49ab6ae16c100410/cmd/commandfuncs.go#L390-L426","documentation":"Error \"sending configuration to instance: %v\" thrown in caddyserver/caddy.","triggerScenarios":"Thrown at cmd/commandfuncs.go:408 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the Caddy instance is running and its admin endpoint is reachable, then retry the command.","Check the wrapped error for connection or TLS problems."],"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-15T22:17:37.221Z"}