nats-io/nats-server · error
expected 'cert_match_skip_invalid' to be a boolean
Error message
expected 'cert_match_skip_invalid' to be a boolean
What it means
Raised in server/opts.go while parsing the cert_store block: the value bound to cert_match_skip_invalid failed the type assertion to bool (mv.(bool)), meaning the config supplied a non-boolean such as a quoted string 'true'. The faulty input is the cert_match_skip_invalid value.
Source
Thrown at server/certstore/errors.go:75
ErrBadCertStore = errors.New("cert store type not implemented")
// ErrConflictCertFileAndStore represents ambiguous configuration of both file and store
ErrConflictCertFileAndStore = errors.New("'cert_file' and 'cert_store' may not both be configured")
// ErrBadCertStoreField represents malformed cert_store option
ErrBadCertStoreField = errors.New("expected 'cert_store' to be a valid non-empty string")
// ErrBadCertMatchByField represents malformed cert_match_by option
ErrBadCertMatchByField = errors.New("expected 'cert_match_by' to be a valid non-empty string")
// ErrBadCertMatchField represents malformed cert_match option
ErrBadCertMatchField = errors.New("expected 'cert_match' to be a valid non-empty string")
// ErrBadCaCertMatchField represents malformed cert_match option
ErrBadCaCertMatchField = errors.New("expected 'ca_certs_match' to be a valid non-empty string array")
// ErrBadCertMatchSkipInvalidField represents malformed cert_match_skip_invalid option
ErrBadCertMatchSkipInvalidField = errors.New("expected 'cert_match_skip_invalid' to be a boolean")
// ErrOSNotCompatCertStore represents cert_store passed that exists but is not valid on current OS
ErrOSNotCompatCertStore = errors.New("cert_store not compatible with current operating system")
)
View on GitHub (pinned to 3a66a489d2)
Solutions
- Use a bare boolean: cert_match_skip_invalid: true (no quotes)
- Omit the field to accept the default behavior
- Verify the value is not a string or number in the config file
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at server/certstore/errors.go:75 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of nats-io/nats-server@3a66a489d2 (2026-09-02).
Data as JSON: /api/errors/76642cb4ff947fe3.
Report an issue: GitHub.