{"record":{"id":"66248a9b1b7fcffa","repo":"dbt-labs/dbt-core","slug":"v1-catalog-types-never-maps-a-raw-type-string-onto","errorCode":null,"errorMessage":"V1_CATALOG_TYPES never maps a raw type string onto this variant","messagePattern":"V1_CATALOG_TYPES never maps a raw type string onto this variant","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/dbt-schemas/src/schemas/dbt_catalogs.rs","lineNumber":1378,"sourceCode":"                        && *file_format != FileFormat::Delta\n                    {\n                        return err!(code => ErrorCode::InvalidConfig, hacky_yml_loc => Some(catalog.write_integrations.1.clone()),\n                                \"integration '{}': when table_format=iceberg, file_format must be 'delta'\",\n                                write_integration.integration_name);\n                    }\n                }\n\n                CatalogType::HiveMetastore => {\n                    if write_integration.adapter_properties.is_some() {\n                        return err!(code => ErrorCode::InvalidConfig, hacky_yml_loc => Some(catalog.write_integrations.1.clone()),\n                            \"integration '{}': adapter_properties not allowed for hive_metastore\",\n                            write_integration.integration_name);\n                    }\n                }\n\n                CatalogType::BiglakeMetastore => { /* no non-structural constraints */ }\n                _ => {\n                    unreachable!(\"V1_CATALOG_TYPES never maps a raw type string onto this variant\")\n                }\n            }\n        }\n    }\n\n    Ok(())\n}\n\n#[cfg(test)]\nmod tests {\n    use super::*;\n    use dbt_yaml as yml;\n    use std::path::Path;\n\n    fn parse_view_and_validate(yaml: &str) -> FsResult<()> {\n        let v: yml::Value = yml::from_str(yaml).unwrap();\n        let v_span = v.span();\n        let m = v.as_mapping().expect(\"top-level YAML must be a mapping\");","sourceCodeStart":1360,"sourceCodeEnd":1396,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-schemas/src/schemas/dbt_catalogs.rs#L1360-L1396","documentation":"A documented-invariant guard inside validate_catalogs: the V1_CATALOG_TYPES mapping table can never produce this CatalogType variant from a raw type string, so reaching this branch means an enum variant was constructed programmatically through a v2-only path and then handed to v1 validation — an internal v1/v2 invariant violation, not bad user input.","triggerScenarios":"Thrown at crates/dbt-schemas/src/schemas/dbt_catalogs.rs:1378 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Only construct this variant through catalogs-v2 parsing paths","Extend V1_CATALOG_TYPES if v1 catalogs.yml must express this type","Return a structured validation error instead of relying on the unreachable invariant"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0267ce9170576975b76b64ce856b2e5848e96617","analyzedAt":"2026-09-07T21:53:39.732Z","contentChangedAt":"2026-09-07T21:53:39.732Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}