{"record":{"id":"f73a3c1e744f776d","repo":"caddyserver/caddy","slug":"getting-events-app-v-f73a3c","errorCode":null,"errorMessage":"getting events app: %v","messagePattern":"getting events app: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"modules/caddytls/tls.go","lineNumber":165,"sourceCode":"\t// set of subjects with managed certificates,\n\t// and hashes of manually-loaded certificates\n\t// (managing's value is an optional issuer key, for distinction)\n\tmanaging, loaded map[string]string\n}\n\n// CaddyModule returns the Caddy module information.\nfunc (TLS) CaddyModule() caddy.ModuleInfo {\n\treturn caddy.ModuleInfo{\n\t\tID:  \"tls\",\n\t\tNew: func() caddy.Module { return new(TLS) },\n\t}\n}\n\n// Provision sets up the configuration for the TLS app.\nfunc (t *TLS) Provision(ctx caddy.Context) error {\n\teventsAppIface, err := ctx.App(\"events\")\n\tif err != nil {\n\t\treturn fmt.Errorf(\"getting events app: %v\", err)\n\t}\n\tt.events = eventsAppIface.(*caddyevents.App)\n\tt.ctx = ctx\n\tt.logger = ctx.Logger()\n\trepl := caddy.NewReplacer()\n\tt.managing, t.loaded = make(map[string]string), make(map[string]string)\n\tt.serverNames = make(map[string]serverNameRegistration)\n\tt.serverNamesMu = new(sync.Mutex)\n\n\t// set up default DNS module, if any, and make sure it implements all the\n\t// common libdns interfaces, since it could be used for a variety of things\n\t// (do this before provisioning other modules, since they may rely on this)\n\tif len(t.DNSRaw) > 0 {\n\t\tdnsMod, err := ctx.LoadModule(t, \"DNSRaw\")\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"loading overall DNS provider module: %v\", err)\n\t\t}\n\t\tswitch dnsMod.(type) {","sourceCodeStart":147,"sourceCodeEnd":183,"githubUrl":"https://github.com/caddyserver/caddy/blob/50e54ee279aa1e504fe218ca49ab6ae16c100410/modules/caddytls/tls.go#L147-L183","documentation":"Wrapper in TLS.Provision for ctx.App(\"events\") failure: the TLS app needs the events app (for certificate lifecycle event emission) but it could not be obtained. This indicates the events app failed to provision or is unavailable in the config; the wrapped error carries the cause.","triggerScenarios":"Thrown at modules/caddytls/tls.go:165 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the events app is configured and loads correctly; the wrapped error explains the failure."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"50e54ee279aa1e504fe218ca49ab6ae16c100410","analyzedAt":"2026-08-15T09:20:21.641Z","contentChangedAt":"2026-08-15T09:20:21.641Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}