juspay/hyperswitch · error

Failed to validate drainer configuration

Error message

Failed to validate drainer configuration

What it means

Error "Failed to validate drainer configuration" thrown in juspay/hyperswitch.

Source

Thrown at crates/drainer/src/main.rs:16

use std::collections::HashMap;

use drainer::{errors::DrainerResult, logger, services, settings, start_drainer, start_web_server};
use router_env::tracing::Instrument;

#[tokio::main]
async fn main() -> DrainerResult<()> {
    // Get configuration
    let cmd_line = <settings::CmdLineConf as clap::Parser>::parse();

    #[allow(clippy::expect_used)]
    let conf = settings::Settings::with_config_path(cmd_line.config_path)
        .expect("Unable to construct application configuration");
    #[allow(clippy::expect_used)]
    conf.validate()
        .expect("Failed to validate drainer configuration");

    let state = settings::AppState::new(conf.clone()).await;

    let mut stores = HashMap::new();
    for (tenant_name, tenant) in conf.multitenancy.get_tenants() {
        let store = std::sync::Arc::new(services::Store::new(&state.conf, false, tenant).await);
        stores.insert(tenant_name.clone(), store);
    }

    #[allow(clippy::print_stdout)] // The logger has not yet been initialized
    #[cfg(feature = "vergen")]
    {
        println!("Starting drainer (Version: {})", router_env::git_tag!());
    }

    let _guard = router_env::setup(
        &conf.log,
        router_env::service_name!(),

View on GitHub (pinned to 705a321950)

Solutions

  1. Fix the invalid drainer configuration values reported by validation; compare with the reference config

When it happens

Trigger: Thrown at crates/drainer/src/main.rs:16 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of juspay/hyperswitch@705a321950 (2026-08-19). Data as JSON: /api/errors/3c78644d8672e415. Report an issue: GitHub.