{"record":{"id":"f7fbf4619ea67b7c","repo":"BoundaryML/baml","slug":"unsupported","errorCode":null,"errorMessage":"Unsupported {} `{}`: {}","messagePattern":"Unsupported (.+?) `(.+?)`: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"engine/baml-lib/baml-core/src/ir/ir_helpers/error_utils.rs","lineNumber":84,"sourceCode":"                )\n            }\n            _ => {\n                let suggestions = suggestions.join(\", \");\n                anyhow::bail!(\n                    \"{} `{}` not found. Did you mean one of: {}?\",\n                    $type,\n                    $name,\n                    suggestions\n                )\n            }\n        }\n    }};\n}\n\n#[macro_export]\nmacro_rules! error_unsupported {\n    ($type:expr, $name:expr, $reason:expr) => {\n        anyhow::bail!(\"Unsupported {} `{}`: {}\", $type, $name, $reason)\n    };\n}\n","sourceCodeStart":66,"sourceCodeEnd":87,"githubUrl":"https://github.com/BoundaryML/baml/blob/bd85ce9dee1463ff04d27efd20531013a4ff46c1/engine/baml-lib/baml-core/src/ir/ir_helpers/error_utils.rs#L66-L87","documentation":"The error_unsupported! macro reports a construct the compiler/IR does not support, formatted 'Unsupported TYPE `NAME`: REASON'. Unlike not-found errors, the entity exists but some feature or shape of it is rejected (e.g. an unsupported type usage, feature, or expression).","triggerScenarios":"Calling error_unsupported!(\"type\", name, reason) during IR resolution when a declared construct uses an unsupported feature — e.g. unsupported generic usage or a type expression the backend cannot represent.","commonSituations":"Using a newer/experimental .baml language feature with an older compiler; attempting type constructs not implemented for a target language's client codegen; copying patterns from docs targeting a different BAML version.","solutions":["Read the REASON in the message and replace the unsupported construct with a supported equivalent","Upgrade the BAML compiler/generator to a version supporting the feature","Simplify the type expression (e.g. replace exotic generics with a named class)","Check release notes for the feature's availability"],"exampleFix":"// before\nfunction F() -> map<string, list<map<string, int>>>\n// after\nclass Nested { counts map<string, int> }\nfunction F() -> map<string, Nested>","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"match result {\n  Err(e) if e.to_string().starts_with(\"Unsupported\") => {\n    // surface the reason to the user; do not retry\n    report_unsupported_construct(&e);\n  }\n  other => other?,\n}","preventionTips":["Keep the BAML CLI and generated clients on the same version","Check feature support in release notes before adopting new .baml syntax","Prefer well-supported plain classes/enums over exotic type expressions"],"tags":["baml","unsupported","macro"],"backgroundTag":"unsupported-operation","analyzedSha":"bd85ce9dee1463ff04d27efd20531013a4ff46c1","analyzedAt":"2026-09-12T03:38:25.718Z","contentChangedAt":"2026-09-12T03:38:25.718Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}