caddyserver/caddy · error
checking %v to determine if certificate for hostname '%s' sh
Error message
checking %v to determine if certificate for hostname '%s' should be allowed: %v
What it means
Error "checking %v to determine if certificate for hostname '%s' should be allowed: %v" thrown in caddyserver/caddy.
Source
Thrown at modules/caddytls/ondemand.go:150
askURL.RawQuery = qs.Encode()
askURLString := askURL.String()
var remote string
if chi, ok := ctx.Value(certmagic.ClientHelloInfoCtxKey).(*tls.ClientHelloInfo); ok && chi != nil {
remote = chi.Conn.RemoteAddr().String()
}
if c := p.logger.Check(zapcore.DebugLevel, "asking permission endpoint"); c != nil {
c.Write(
zap.String("remote", remote),
zap.String("domain", name),
zap.String("url", askURLString),
)
}
resp, err := onDemandAskClient.Get(askURLString)
if err != nil {
return fmt.Errorf("checking %v to determine if certificate for hostname '%s' should be allowed: %v",
askEndpoint, name, err)
}
resp.Body.Close()
if c := p.logger.Check(zapcore.DebugLevel, "response from permission endpoint"); c != nil {
c.Write(
zap.String("remote", remote),
zap.String("domain", name),
zap.String("url", askURLString),
zap.Int("status", resp.StatusCode),
)
}
if resp.StatusCode < 200 || resp.StatusCode > 299 {
return fmt.Errorf("%s: %w %s - non-2xx status code %d", name, ErrPermissionDenied, askEndpoint, resp.StatusCode)
}
return nilView on GitHub (pinned to 50e54ee279)
Solutions
- Ensure the 'ask' endpoint is reachable and responding; the wrapped error explains the request failure.
When it happens
Trigger: Thrown at modules/caddytls/ondemand.go:150 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- SSL/TLS and certificate errors — how TLS handshakes and certificate validation fail.
AI-assisted analysis of caddyserver/caddy@50e54ee279 (2026-08-15).
Data as JSON: /api/errors/80d85ad33d305bd9.
Report an issue: GitHub.