{"record":{"id":"85fa8109cb924079","repo":"caddyserver/caddy","slug":"loading-fallback-encoder-module-v-85fa81","errorCode":null,"errorMessage":"loading fallback encoder module: %v","messagePattern":"loading fallback encoder module: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"modules/logging/filterencoder.go","lineNumber":96,"sourceCode":"\n// Provision sets up the encoder.\nfunc (fe *FilterEncoder) Provision(ctx caddy.Context) error {\n\tfe.ctx = ctx\n\n\tif fe.WrappedRaw == nil {\n\t\t// if wrap is not specified, default to JSON\n\t\tfe.wrapped = &JSONEncoder{}\n\t\tif p, ok := fe.wrapped.(caddy.Provisioner); ok {\n\t\t\tif err := p.Provision(ctx); err != nil {\n\t\t\t\treturn fmt.Errorf(\"provisioning fallback encoder module: %v\", err)\n\t\t\t}\n\t\t}\n\t\tfe.wrappedIsDefault = true\n\t} else {\n\t\t// set up wrapped encoder\n\t\tval, err := ctx.LoadModule(fe, \"WrappedRaw\")\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"loading fallback encoder module: %v\", err)\n\t\t}\n\t\tfe.wrapped = val.(zapcore.Encoder)\n\t}\n\n\t// set up each field filter\n\tif fe.Fields == nil {\n\t\tfe.Fields = make(map[string]LogFieldFilter)\n\t}\n\tvals, err := ctx.LoadModule(fe, \"FieldsRaw\")\n\tif err != nil {\n\t\treturn fmt.Errorf(\"loading log filter modules: %v\", err)\n\t}\n\tfor fieldName, modIface := range vals.(map[string]any) {\n\t\tfe.Fields[fieldName] = modIface.(LogFieldFilter)\n\t}\n\n\treturn nil\n}","sourceCodeStart":78,"sourceCodeEnd":114,"githubUrl":"https://github.com/caddyserver/caddy/blob/50e54ee279aa1e504fe218ca49ab6ae16c100410/modules/logging/filterencoder.go#L78-L114","documentation":"Error \"loading fallback encoder module: %v\" thrown in caddyserver/caddy.","triggerScenarios":"Thrown at modules/logging/filterencoder.go:96 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the fallback encoder module name and configuration; the wrapped error identifies the problem."],"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-15T17:31:12.345Z"}