{"record":{"id":"0af792ceea94dffc","repo":"dbt-labs/dbt-core","slug":"failfast-error-message","errorCode":null,"errorMessage":"FailFast Error: {message}","messagePattern":"FailFast Error: (.+?)","errorType":"exception","errorClass":"minijinja::Error (InvalidOperation)","httpStatus":null,"severity":"error","filePath":"crates/dbt-jinja-utils/src/functions/base.rs","lineNumber":1289,"sourceCode":"                    ))\n                }\n            }\n            // (msg, node=None)\n            \"raise_fail_fast_error\" => {\n                let mut args = ArgParser::new(args, None);\n                let message = args.get::<String>(\"msg\")?;\n                if let Some((node_id, file_path)) = node_metadata_from_state(state) {\n                    Err(Error::new(\n                        ErrorKind::InvalidOperation,\n                        format!(\n                            \"FailFast Error for {} from {}: {}\",\n                            node_id,\n                            file_path.display(),\n                            message\n                        ),\n                    ))\n                } else {\n                    Err(Error::new(\n                        ErrorKind::InvalidOperation,\n                        format!(\"FailFast Error: {message}\"),\n                    ))\n                }\n            }\n            // (snapshot_time_data_type: str, updated_at_data_type: str)\n            \"warn_snapshot_timestamp_data_types\" => {\n                let mut args = ArgParser::new(args, None);\n                let snapshot_time_data_type = args\n                    .get::<String>(\"snapshot_time_data_type\")\n                    .unwrap_or_else(|_| \"\".to_string());\n                let updated_at_data_type = args\n                    .get::<String>(\"updated_at_data_type\")\n                    .unwrap_or_else(|_| \"\".to_string());\n\n                let metadata = node_metadata_from_state(state);\n                let snapshot_name = state.lookup(\"model\", &[]).and_then(|m| {\n                    m.get_attr(\"name\")","sourceCodeStart":1271,"sourceCodeEnd":1307,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-jinja-utils/src/functions/base.rs#L1271-L1307","documentation":"Fallback variant of the fail-fast error: `exceptions.raise_fail_fast_error(msg=...)` was invoked but no node id/file path could be recovered from the Jinja state, so only 'FailFast Error: {message}' is reported. The run still halts as the macro author intended.","triggerScenarios":"Explicit `raise_fail_fast_error(msg=...)` call during Jinja evaluation where `node_metadata_from_state(state)` returns None (evaluation outside a node context, parse-time execution, or dispatched macro without node metadata).","commonSituations":"Fail-fast guards in macros that run during parse/compile or in contexts without node attribution; the same guard fires fine under `dbt run` but without file info elsewhere.","solutions":["Fix the condition described in the message — the run abort is intentional.","Run through `dbt run`/`build` to get the located variant showing the raising node/file.","Adjust the macro to only raise within node contexts if the parse-time firing is unintended."],"exampleFix":"# before\n# FailFast Error: row count is 0\n\n# after\n$ dbt build --select my_model\n# FailFast Error for model.my_model from models/my_model.sql: row count is 0","handlingStrategy":"try-catch","validationCode":"// Ensure fail-fast guards execute within a node context for locatable errors\nif state.lookup(\"node_id\").is_none() {\n    // skip or defer the guard to the run phase\n}","typeGuard":null,"tryCatchPattern":"match result {\n    Err(e) if e.message.contains(\"FailFast Error\") => {\n        // deliberate abort; handle msg and stop the pipeline\n    }\n    other => other,\n}","preventionTips":["Do not invoke fail-fast guards at parse/compile time.","Fix the condition described in the message rather than suppressing it.","Run via dbt build/run for node-attributed errors."],"tags":["dbt","jinja","fail-fast","user-raised"],"backgroundTag":"fail-fast-error-raised","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"}