{"record":{"id":"4cbaca8f319ebee9","repo":"caddyserver/caddy","slug":"unsupported-type","errorCode":null,"errorMessage":"unsupported type","messagePattern":"unsupported type","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"modules/caddyhttp/logging.go","lineNumber":192,"sourceCode":"type StringArray []string\n\n// UnmarshalJSON satisfies json.Unmarshaler.\nfunc (sa *StringArray) UnmarshalJSON(b []byte) error {\n\tvar jsonObj any\n\terr := json.Unmarshal(b, &jsonObj)\n\tif err != nil {\n\t\treturn err\n\t}\n\tswitch obj := jsonObj.(type) {\n\tcase string:\n\t\t*sa = StringArray([]string{obj})\n\t\treturn nil\n\tcase []any:\n\t\ts := make([]string, 0, len(obj))\n\t\tfor _, v := range obj {\n\t\t\tvalue, ok := v.(string)\n\t\t\tif !ok {\n\t\t\t\treturn errors.New(\"unsupported type\")\n\t\t\t}\n\t\t\ts = append(s, value)\n\t\t}\n\t\t*sa = StringArray(s)\n\t\treturn nil\n\t}\n\treturn errors.New(\"unsupported type\")\n}\n\n// errLogValues inspects err and returns the status code\n// to use, the error log message, and any extra fields.\n// If err is a HandlerError, the returned values will\n// have richer information.\nfunc errLogValues(err error) (status int, msg string, fields func() []zapcore.Field) {\n\tvar handlerErr HandlerError\n\tif errors.As(err, &handlerErr) {\n\t\tstatus = handlerErr.StatusCode\n\t\tif handlerErr.Err == nil {","sourceCodeStart":174,"sourceCodeEnd":210,"githubUrl":"https://github.com/caddyserver/caddy/blob/50e54ee279aa1e504fe218ca49ab6ae16c100410/modules/caddyhttp/logging.go#L174-L210","documentation":"After a successful DNS publication, Caddy records publication history into each config's metadata (cfg.meta.Publications maps of publisher -> name -> time) and json.Marshal of that metadata failed. Like the rotation-path marshal error, this is a near-impossible defensive path for well-formed data.","triggerScenarios":"json.Marshal(cfg.meta) errors because a value in the publication history is not JSON-serializable — only plausible via memory corruption or a bug writing unmarshalable dynamic values.","commonSituations":"Essentially never in practice; treat an occurrence as a Caddy bug or memory fault and gather diagnostics.","solutions":["Capture the wrapped error and Caddy version; report upstream as a bug.","Restart the instance to rebuild metadata from storage.","Reset the ech/configs folder if it recurs and blocks publication bookkeeping."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"Catch and log with full context (publisher key, config IDs); publication already succeeded, so bookkeeping failure is non-fatal — retry occurs on the next publication cycle.","preventionTips":["Treat as a bug signal: capture Caddy version and error for upstream reporting.","Restart to rebuild metadata if it recurs.","Keep publication metadata untouched by external tooling."],"tags":["caddy","caddytls","ech","json","publication"],"backgroundTag":null,"analyzedSha":"50e54ee279aa1e504fe218ca49ab6ae16c100410","analyzedAt":"2026-08-15T09:20:21.641Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}