{"record":{"id":"4d3da18241931378","repo":"amir20/dozzle","slug":"failed-to-load-subscription-s-w","errorCode":null,"errorMessage":"failed to load subscription %s: %w","messagePattern":"failed to load subscription (.+?): %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/notification/config.go","lineNumber":167,"sourceCode":"\t\t\t\told.MetricCooldowns.Range(func(id string, t time.Time) bool {\n\t\t\t\t\ts.MetricCooldowns.Store(id, t)\n\t\t\t\t\treturn true\n\t\t\t\t})\n\t\t\t}\n\n\t\t\ts.EventCooldowns = xsync.NewMap[string, time.Time]()\n\t\t\tif old.EventCooldowns != nil {\n\t\t\t\told.EventCooldowns.Range(func(id string, t time.Time) bool {\n\t\t\t\t\ts.EventCooldowns.Store(id, t)\n\t\t\t\t\treturn true\n\t\t\t\t})\n\t\t\t}\n\n\t\t\t// MetricSampleBuffers: start fresh since ring buffers can't be safely cloned\n\t\t}\n\n\t\tif err := m.loadSubscription(s); err != nil {\n\t\t\treturn fmt.Errorf(\"failed to load subscription %s: %w\", sub.Name, err)\n\t\t}\n\t}\n\n\t// Load dispatchers (cloud dispatchers are skipped; they are managed via cloud.yml)\n\tfor _, dc := range dispatchers {\n\t\tif dc.Type == \"cloud\" {\n\t\t\tcontinue\n\t\t}\n\t\td, err := createDispatcher(DispatcherConfig{\n\t\t\tID:       dc.ID,\n\t\t\tName:     dc.Name,\n\t\t\tType:     dc.Type,\n\t\t\tURL:      dc.URL,\n\t\t\tTemplate: dc.Template,\n\t\t\tHeaders:  dc.Headers,\n\t\t})\n\t\tif err != nil {\n\t\t\tlog.Warn().Err(err).Str(\"name\", dc.Name).Str(\"type\", dc.Type).Msg(\"Skipping unknown dispatcher type\")","sourceCodeStart":149,"sourceCodeEnd":185,"githubUrl":"https://github.com/amir20/dozzle/blob/d9463cbe21874e44ab79db6fa63e746ca7d22928/internal/notification/config.go#L149-L185","documentation":"HandleNotificationConfig applies a subscription's config via loadSubscription and, on failure, wraps the error with the subscription name. This means one named subscription had an invalid dispatcher reference or malformed rule config, aborting the whole notification state replacement.","triggerScenarios":"Thrown at internal/notification/config.go:167 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the named subscription references an existing dispatcher id.","Validate the subscription's rule/metric config fields against the schema.","Fix or remove the offending subscription in notifications.yml and reload."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"d9463cbe21874e44ab79db6fa63e746ca7d22928","analyzedAt":"2026-09-07T10:08:55.855Z","contentChangedAt":"2026-09-07T10:08:55.855Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}