{"record":{"id":"7d661d32dbc5d30a","repo":"dbt-labs/dbt-core","slug":"unknown-method-on-exceptions-method","errorCode":null,"errorMessage":"Unknown method on Exceptions: {method}","messagePattern":"Unknown method on Exceptions: (.+?)","errorType":"exception","errorClass":"minijinja::Error (UnknownMethod)","httpStatus":null,"severity":"error","filePath":"crates/dbt-jinja-utils/src/functions/base.rs","lineNumber":1328,"sourceCode":"                });\n\n                let name_part = snapshot_name\n                    .as_deref()\n                    .map(|n| format!(\"snapshot '{n}'\"))\n                    .unwrap_or_else(|| \"snapshot table\".to_string());\n                let location_hint = metadata\n                    .map(|(_, path)| format!(\"\\n  --> {}\", path.display()))\n                    .unwrap_or_default();\n\n                let warning = format!(\n                    \"Data type of {name_part} hard-delete timestamps ({snapshot_time_data_type}) does not match its 'updated_at'-derived timestamp columns ({updated_at_data_type}). Values written when closing out deleted rows will be implicitly converted. Override the 'snapshot_get_time' macro in your project to emit a matching type.{location_hint}\"\n                );\n\n                emit_warn_log_message(ErrorCode::SnapshotTimestampMismatch, warning);\n\n                Ok(Value::UNDEFINED)\n            }\n            _ => Err(Error::new(\n                ErrorKind::UnknownMethod,\n                format!(\"Unknown method on Exceptions: {method}\"),\n            )),\n        }\n    }\n}\n\n/// Insert `defer_relation` into a serialized graph node's mapping. When\n/// `defer_nodes` has a matching entry the value is the dbt-core-shaped\n/// `DeferRelation` dict; otherwise it's null. The key is always present so\n/// users can write `node.defer_relation is not none` without hitting an\n/// \"undefined value\" error. (#1366)\n///\n/// `to_value` is a closure that builds a serializable `DeferRelation` from\n/// the deferred node, allowing this helper to be reused across the three\n/// deferrable resource types without making the helper itself generic.\nfn inject_defer_relation<L>(\n    map: &mut dbt_yaml::Mapping,","sourceCodeStart":1310,"sourceCodeEnd":1346,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-jinja-utils/src/functions/base.rs#L1310-L1346","documentation":"The `exceptions` Jinja object only exposes a fixed set of methods (raise_compiler_error, raise_fail_fast_error, contract-check helpers, etc.). Calling any other method name on `exceptions` reaches the catch-all arm of the dispatch and raises UnknownMethod, indicating the requested method does not exist in this implementation.","triggerScenarios":"Jinja code calls `exceptions.<method>(...)` with a method name not handled by the match in `call_method`, e.g. misspelled `raise_compilor_error`, or methods available in upstream dbt-core but not implemented in this Rust Jinja utils library.","commonSituations":"Typos in macro code; porting Python-dbt macros that use unimplemented exceptions helpers; package macros written against a newer/older dbt API surface.","solutions":["Check the method name spelling against the implemented exceptions methods in crates/dbt-jinja-utils/src/functions/base.rs.","Replace unimplemented helpers with supported ones (e.g. `raise_compiler_error`).","If the helper genuinely is missing, implement it in the `call_method` dispatch of the Exceptions function.","Pin the vendored package to a version whose macros match the supported API."],"exampleFix":"# before\n{% do exceptions.raise_compilor_error('bad config') %}\n\n# after\n{% do exceptions.raise_compiler_error('bad config') %}","handlingStrategy":"type-guard","validationCode":"{# Jinja-side guard before calling a method on exceptions #}\n{% if exceptions.raise_compiler_error is defined %}\n  {% do exceptions.raise_compiler_error(msg) %}\n{% else %}\n  {{ log('exceptions helper unavailable', info=True) }}\n{% endif %}","typeGuard":"// Rust-side guard before dispatch\nfn is_supported_exceptions_method(method: &str) -> bool {\n    matches!(method,\n        \"raise_compiler_error\" | \"raise_fail_fast_error\" | \"warn\" | \"log\"\n    )\n}","tryCatchPattern":null,"preventionTips":["Grep your project and packages for `exceptions.` calls and verify each name is supported by this library.","Avoid copying helper method names from Python dbt-core without checking the Rust implementation.","Keep vendored packages aligned with the supported API surface.","Add a unit test exercising every exceptions method your macros use."],"tags":["dbt","jinja","unknown-method","macro"],"backgroundTag":"method-not-implemented","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"}