{"record":{"id":"5d2a7a31502d5e07","repo":"juspay/hyperswitch","slug":"failed-to-read-sdk-config-file","errorCode":null,"errorMessage":"Failed to read SDK config file '{}': {}","messagePattern":"Failed to read SDK config file '(.+?)': (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/payment_link/build.rs","lineNumber":29,"sourceCode":"        .unwrap_or_else(|| {\n            #[cfg(debug_assertions)]\n            let default = Env::Development;\n            #[cfg(not(debug_assertions))]\n            let default = Env::Production;\n            default\n        });\n\n    // Use the payment_link specific SDK URL configuration\n    let sdk_config_path = \"config/sdk_urls.toml\";\n\n    // Tell cargo to rerun if config file changes\n    println!(\"cargo:rerun-if-changed={}\", sdk_config_path);\n    println!(\"cargo:rerun-if-env-changed=ENVIRONMENT\");\n\n    // Read and parse SDK URLs TOML file\n    #[allow(clippy::panic)]\n    let config_content = fs::read_to_string(sdk_config_path).unwrap_or_else(|e| {\n        panic!(\n            \"Failed to read SDK config file '{}': {}\",\n            sdk_config_path, e\n        );\n    });\n\n    #[allow(clippy::panic)]\n    let config: HashMap<Env, EnvConfig> = toml::from_str(&config_content).unwrap_or_else(|e| {\n        panic!(\"Failed to parse TOML in '{}': {}\", sdk_config_path, e);\n    });\n\n    // Extract SDK URL for the current environment\n    #[allow(clippy::panic)]\n    let sdk_url = config\n        .get(&environment)\n        .map(|c| c.sdk_url.as_str())\n        .unwrap_or_else(|| {\n            panic!(\n                \"Missing [{}] section in config file: {}\",","sourceCodeStart":11,"sourceCodeEnd":47,"githubUrl":"https://github.com/juspay/hyperswitch/blob/705a3219504c3cf9034e71d956455f8834ea4e64/crates/payment_link/build.rs#L11-L47","documentation":"Error \"Failed to read SDK config file '{}': {}\" thrown in juspay/hyperswitch.","triggerScenarios":"Thrown at crates/payment_link/build.rs:29 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the SDK config file exists at the path shown and is readable by the build user","Check the path configured for the payment link SDK config in the build environment"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"705a3219504c3cf9034e71d956455f8834ea4e64","analyzedAt":"2026-08-19T10:36:43.745Z","contentChangedAt":"2026-08-19T10:36:43.745Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}