juspay/hyperswitch · error

Failed to decrypt global database configuration

Error message

Failed to decrypt global database configuration

What it means

Error "Failed to decrypt global database configuration" thrown in juspay/hyperswitch.

Source

Thrown at crates/router/src/configs/secrets_transformers.rs:477

            .expect("Failed to decrypt master database configuration");

    #[allow(clippy::expect_used)]
    let accounts_database = if let Some(accounts_database) = conf.accounts_database {
        Some(
            settings::Database::convert_to_raw_secret(accounts_database, secret_management_client)
                .await
                .expect("Failed to decrypt accounts database configuration"),
        )
    } else {
        None
    };

    #[allow(clippy::expect_used)]
    let global_database = if let Some(global_database) = conf.global_database {
        Some(
            settings::Database::convert_to_raw_secret(global_database, secret_management_client)
                .await
                .expect("Failed to decrypt global database configuration"),
        )
    } else {
        None
    };

    #[cfg(feature = "olap")]
    #[allow(clippy::expect_used)]
    let analytics =
        analytics::AnalyticsConfig::convert_to_raw_secret(conf.analytics, secret_management_client)
            .await
            .expect("Failed to decrypt analytics configuration");

    #[cfg(feature = "olap")]
    #[allow(clippy::expect_used)]
    let replica_database =
        settings::Database::convert_to_raw_secret(conf.replica_database, secret_management_client)
            .await
            .expect("Failed to decrypt replica database configuration");

View on GitHub (pinned to 3093f22cc4)

Solutions

  1. Verify the master key/KMS configuration used to decrypt the global database credentials

When it happens

Trigger: Thrown at crates/router/src/configs/secrets_transformers.rs:499 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of juspay/hyperswitch@3093f22cc4 (2026-08-19). Data as JSON: /api/errors/d15fdba5cc630b14. Report an issue: GitHub.