{"record":{"id":"bd76cfa3add6122a","repo":"dbt-labs/dbt-core","slug":"configure","errorCode":null,"errorMessage":"configure","messagePattern":"configure","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/dbt-auth/src/snowflake/mod.rs","lineNumber":806,"sourceCode":"        ])\n    }\n\n    fn assert_parse_auth_config_error(config: Mapping, expected_msg: &str) {\n        let cfg = AdapterConfig::new(config);\n        let result = parse_auth(&cfg, &NoopAuthWarningPrinter);\n        match result {\n            Err(AuthError::Config(msg)) => assert_eq!(msg, expected_msg),\n            other => panic!(\"Expected AuthError::Config({expected_msg:?}), got {other:?}\"),\n        }\n    }\n\n    fn run_config_test(config: Mapping, expected: &[(&str, &str)]) {\n        let auth = SnowflakeAuth {\n            warning_printer: Box::new(NoopAuthWarningPrinter),\n        };\n        let auth_result = auth\n            .configure(&AdapterConfig::new(config))\n            .expect(\"configure\");\n\n        let mut results = Mapping::default();\n\n        for (k, v) in auth_result.into_iter() {\n            let key = match k {\n                OptionDatabase::Username => \"user\".to_owned(),\n                OptionDatabase::Password => \"password\".to_owned(),\n                OptionDatabase::Other(name) => name.to_owned(),\n                _ => continue,\n            };\n            if key == snowflake::CLIENT_TIMEOUT || key == snowflake::LOGIN_TIMEOUT {\n                continue;\n            }\n            results.insert(key.into(), option_str_value(&v).into());\n        }\n\n        for &(key, expected_val) in expected {\n            assert_eq!(","sourceCodeStart":788,"sourceCodeEnd":824,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-auth/src/snowflake/mod.rs#L788-L824","documentation":"A test-only panic: `run_config_test` calls `auth.configure(&AdapterConfig::new(config)).expect(\"configure\")`, which panics if `SnowflakeAuth::configure` returns an `Err`. The `expect` message is simply \"configure\", so the panic surfaces the underlying `AuthError` display text. It is raised by the test harness for simple-pass and timeout/log-level override scenarios, not by library code in production paths.","triggerScenarios":"Any change to `SnowflakeAuth::configure` that makes it reject the test fixture configs (simple connect args, application name override, driver log level override, connect/request timeout variants) — e.g. a new required field or stricter validation added to the parser.","commonSituations":"Developers modifying snowflake auth config validation or key extraction hit this while running `cargo test -p dbt-auth` after breaking previously-accepted config combinations.","solutions":["Run the failing configure against the test Mapping and read the wrapped AuthError message for the rejected key","Fix the configure/validation regression so the fixture config is accepted again","If the new rejection is intentional, update the test fixtures in `run_config_test` call sites"],"exampleFix":"// before (regression: new required field)\nErr(AuthError::config(\"missing 'account'\"))\n// after: keep defaults for optional fields or update fixture\nlet mut config = base_config();\nconfig.insert(\"account\".into(), \"acct\".into());","handlingStrategy":"try-catch","validationCode":"// no user-side guard; library test harness assertion\nlet auth_result = auth.configure(&AdapterConfig::new(config)).expect(\"configure\");","typeGuard":null,"tryCatchPattern":"let auth_result = auth.configure(&AdapterConfig::new(config)).unwrap_or_else(|e| panic!(\"configure failed: {e}\"));","preventionTips":["Run `cargo test -p dbt-auth` after touching snowflake config parsing","Keep test fixtures in sync with any new required fields","Snapshot AuthError messages to catch validation drift early"],"tags":["rust","tests","snowflake","configure"],"backgroundTag":"internal-invariant-violation","analyzedSha":"0267ce9170576975b76b64ce856b2e5848e96617","analyzedAt":"2026-09-07T21:53:39.732Z","contentChangedAt":"2026-09-07T21:53:39.732Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}