{"record":{"id":"ee66ef08de8dc779","repo":"juspay/hyperswitch","slug":"failed-to-create-event-handler","errorCode":null,"errorMessage":"Failed to create event handler","messagePattern":"Failed to create event handler","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/router/src/configs/settings.rs","lineNumber":541,"sourceCode":"pub struct TenantConfig(pub HashMap<id_type::TenantId, Tenant>);\n\nimpl TenantConfig {\n    /// # Panics\n    ///\n    /// Panics if Failed to create event handler\n    pub async fn get_store_interface_maps(\n        &self,\n        storage_impl: &app::StorageImpl,\n        conf: &configs::Settings,\n        cache_store: Arc<storage_impl::redis::RedisStore>,\n        testable: bool,\n    ) -> (StorageInterfaceMap, AccountsStorageInterfaceMap) {\n        #[allow(clippy::expect_used)]\n        let event_handler = conf\n            .events\n            .get_event_handler()\n            .await\n            .expect(\"Failed to create event handler\");\n        let tenant_stores =\n            futures::future::join_all(self.0.iter().map(|(tenant_name, tenant)| async {\n                let store = Box::pin(AppState::get_store_interface(\n                    storage_impl,\n                    &event_handler,\n                    conf,\n                    tenant,\n                    conf.master_database.clone().into_inner(),\n                    conf.accounts_database_config(),\n                    cache_store.clone(),\n                    testable,\n                ))\n                .await;\n                (tenant_name.clone(), store)\n            }))\n            .await;\n\n        let stores = tenant_stores","sourceCodeStart":523,"sourceCodeEnd":559,"githubUrl":"https://github.com/juspay/hyperswitch/blob/3093f22cc46b46415cca152ea0b234277b251ecd/crates/router/src/configs/settings.rs#L523-L559","documentation":"Error \"Failed to create event handler\" thrown in juspay/hyperswitch.","triggerScenarios":"Thrown at crates/router/src/configs/settings.rs:548 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the events/kafka configuration and that the event backend is reachable"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3093f22cc46b46415cca152ea0b234277b251ecd","analyzedAt":"2026-08-19T10:36:43.745Z","contentChangedAt":"2026-08-19T10:36:43.745Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}