{"record":{"id":"998f7700b88e6eb6","repo":"nats-io/nats-server","slug":"expected-ca-certs-match-to-be-a-valid-non-empty","errorCode":null,"errorMessage":"expected 'ca_certs_match' to be a valid non-empty string array","messagePattern":"expected 'ca_certs_match' to be a valid non-empty string array","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/certstore/errors.go","lineNumber":72,"sourceCode":"\tErrBadMatchByType = errors.New(\"cert match by type not implemented\")\n\n\t// ErrBadCertStore represents unknown CERT_STORE passed\n\tErrBadCertStore = errors.New(\"cert store type not implemented\")\n\n\t// ErrConflictCertFileAndStore represents ambiguous configuration of both file and store\n\tErrConflictCertFileAndStore = errors.New(\"'cert_file' and 'cert_store' may not both be configured\")\n\n\t// ErrBadCertStoreField represents malformed cert_store option\n\tErrBadCertStoreField = errors.New(\"expected 'cert_store' to be a valid non-empty string\")\n\n\t// ErrBadCertMatchByField represents malformed cert_match_by option\n\tErrBadCertMatchByField = errors.New(\"expected 'cert_match_by' to be a valid non-empty string\")\n\n\t// ErrBadCertMatchField represents malformed cert_match option\n\tErrBadCertMatchField = errors.New(\"expected 'cert_match' to be a valid non-empty string\")\n\n\t// ErrBadCaCertMatchField represents malformed cert_match option\n\tErrBadCaCertMatchField = errors.New(\"expected 'ca_certs_match' to be a valid non-empty string array\")\n\n\t// ErrBadCertMatchSkipInvalidField represents malformed cert_match_skip_invalid option\n\tErrBadCertMatchSkipInvalidField = errors.New(\"expected 'cert_match_skip_invalid' to be a boolean\")\n\n\t// ErrOSNotCompatCertStore represents cert_store passed that exists but is not valid on current OS\n\tErrOSNotCompatCertStore = errors.New(\"cert_store not compatible with current operating system\")\n)\n","sourceCodeStart":54,"sourceCodeEnd":80,"githubUrl":"https://github.com/nats-io/nats-server/blob/3a66a489d262bf89b71a71c955c94920394532f3/server/certstore/errors.go#L54-L80","documentation":"Sentinel from certstore option parsing: the 'ca_certs_match' field under a cert_store block is not a usable array of match strings — missing, empty, or containing non-string/blank entries. It is a generic config-validation guard; the input at fault is the ca_certs_match option value itself.","triggerScenarios":"Thrown at server/certstore/errors.go:72 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set ca_certs_match to an array of one or more non-empty strings, e.g. ['CN=MyCA']","Remove the field entirely if CA-subject matching is not needed","Check YAML/JSON quoting mistakes that collapse the array into a scalar or empty list"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3a66a489d262bf89b71a71c955c94920394532f3","analyzedAt":"2026-09-02T04:41:54.247Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}