{"record":{"id":"78da8a830d018938","repo":"dbt-labs/dbt-core","slug":"documentation-depends-on-doc-doc-name-which-wa","errorCode":null,"errorMessage":"Documentation depends on doc '{doc_name}' which was not found","messagePattern":"Documentation depends on doc '(.+?)' which was not found","errorType":"exception","errorClass":"InvalidOperation","httpStatus":null,"severity":"error","filePath":"crates/dbt-jinja-utils/src/functions/base.rs","lineNumber":284,"sourceCode":"                    .package_search_order\n                    .iter()\n                    .find_map(|package_name| self.lookup_doc(package_name, &arg1))\n                    .or_else(|| self.lookup_doc_in_packages(&arg1));\n                (\n                    doc,\n                    self.package_search_order\n                        .first()\n                        .cloned()\n                        .unwrap_or_default(),\n                    arg1,\n                )\n            }\n        };\n\n        match doc {\n            Some(content) => Ok(Value::from_serialize(content)),\n            // `DocTargetNotFoundError`\n            None if self.strict => Err(Error::new(\n                ErrorKind::InvalidOperation,\n                format!(\"Documentation depends on doc '{doc_name}' which was not found\"),\n            )),\n            None => {\n                let current_span = state.current_span_of_context();\n                let current_file_path = state.current_path().clone();\n                if !current_file_path.as_os_str().is_empty() {\n                    let location = CodeLocationWithFile::new(\n                        current_span.start_line,\n                        current_span.start_col,\n                        current_span.start_offset,\n                        current_file_path,\n                    );\n                    Self::warn_missing_doc(&target_package, &doc_name, location);\n                }\n                Ok(Value::from(Self::missing_doc_placeholder(\n                    &target_package,\n                    &doc_name,","sourceCodeStart":266,"sourceCodeEnd":302,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-jinja-utils/src/functions/base.rs#L266-L302","documentation":"doc() resolves the requested doc name (and optional package) against the manifest's documentation blocks. In strict mode, when no matching doc block exists, this error mirrors dbt-core's DocTargetNotFoundError instead of silently rendering nothing.","triggerScenarios":"{{ doc('some_doc') }} where some_doc is not defined in the project or referenced packages, or the package-qualified name {{ doc('pkg', 'doc') }} points to a package without that doc block.","commonSituations":"Typo in the doc name, doc block removed or renamed, missing dependency package in packages.yml, wrong package name in the two-argument form.","solutions":["Check the spelling of the doc name against the docs blocks defined in markdown files.","If using {{ doc('pkg', 'name') }}, verify the package name and that it declares the doc block.","Add the missing dbt package to packages.yml and run dbt deps.","Recreate the removed/renamed doc block or update all references to it."],"exampleFix":"// before\n{{ doc('order_staus') }}\n// after\n{{ doc('order_status') }} // matches {% docs order_status %}...{% enddocs %}","handlingStrategy":"validation","validationCode":"// before rendering, check the doc block exists in the manifest\n// grep -r '{% docs order_status %}' . || echo 'doc block missing'","typeGuard":null,"tryCatchPattern":"// strict mode surfaces DocTargetNotFoundError; catch at render boundary and log the doc_name for triage","preventionTips":["Cross-check doc names against defined {% docs %} blocks in markdown files.","Verify package-qualified references exist in dependencies declared via packages.yml.","Run dbt compile/parse in CI to catch dangling doc references before release."],"tags":["jinja","doc","not-found","dbt"],"backgroundTag":"resource-not-found","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"}