{"record":{"id":"a2f1edb51b641ff2","repo":"BoundaryML/baml","slug":"unsupported-message","errorCode":null,"errorMessage":"unsupported: {message}","messagePattern":"unsupported: (.+?)","errorType":"exception","errorClass":"VmBamlError","httpStatus":null,"severity":"warning","filePath":"baml_language/crates/bex_vm_types/src/errors.rs","lineNumber":128,"sourceCode":"/// An error value from the BAML standard library. Maps 1:1 to a `baml.errors.*` class.\n#[derive(Debug, Error, PartialEq, Clone)]\npub enum VmBamlError {\n    #[error(\"invalid argument: {message}\")]\n    InvalidArgument { message: String },\n\n    #[error(\"parse error: {message}\")]\n    ParseError { message: String },\n\n    #[error(\"I/O error: {message}\")]\n    Io { message: String },\n\n    #[error(\"timeout: {message}\")]\n    Timeout {\n        message: String,\n        duration_ms: Option<i64>,\n    },\n\n    #[error(\"unsupported: {message}\")]\n    Unsupported { message: String },\n\n    #[error(\"access error: {message}\")]\n    AccessError { message: String },\n\n    #[error(\"render prompt: {message}\")]\n    RenderPrompt { message: String },\n\n    #[error(\"LLM client error: {message}\")]\n    LlmClient { message: String },\n\n    /// An error value from the host language that has no direct BAML\n    /// representation. The `handle` is the load-bearing field — it\n    /// references the original host exception object via the\n    /// process-global host-value table, so the originating runtime can\n    /// recover the exact native exception on round-trip. The\n    /// `class_name` / `message` / `language` / `traceback` fields are\n    /// purely metadata for debugging, logging, and user-facing","sourceCodeStart":110,"sourceCodeEnd":146,"githubUrl":"https://github.com/BoundaryML/baml/blob/bd85ce9dee1463ff04d27efd20531013a4ff46c1/baml_language/crates/bex_vm_types/src/errors.rs#L110-L146","documentation":"An error value from the BAML standard library, mapping to the `baml.errors.Unsupported` class. It is raised when an operation is recognized but not supported in the current runtime, configuration, or version — a deliberate signal rather than a bug.","triggerScenarios":"Calling a stdlib function/feature that the current VM build, target platform, or configuration does not implement (e.g. a platform-specific capability, a feature behind a flag, or an operation valid in other runtimes but disabled here).","commonSituations":"Porting BAML programs between runtimes (native vs WASM/sandbox) where some stdlib features are unavailable; using a newer-language feature on an older VM; relying on optional capabilities (e.g. certain encodings or syscalls) not compiled in.","solutions":["Check the VM/runtime version and upgrade to one that supports the operation, or enable the required feature flag.","Catch `baml.errors.Unsupported` and provide an alternative implementation path for environments lacking the feature.","Consult the stdlib docs for platform support notes and guard platform-specific calls.","If the operation should be supported, file an issue — it may be a missing feature in the VM."],"exampleFix":"// before\nlet tz_time = clock.now_in(\"America/New_York\"); // unsupported in this runtime\n// after\ntry {\n  let tz_time = clock.now_in(\"America/New_York\");\n} catch e: baml.errors.Unsupported {\n  let tz_time = clock.now_utc(); // portable fallback\n}\n","handlingStrategy":"fallback","validationCode":"// BAML: check feature availability where exposed\nif !std.supports(\"tz_clock\") {\n  return utc_fallback();\n}","typeGuard":null,"tryCatchPattern":"try {\n  let r = platform_specific_op();\n} catch e: baml.errors.Unsupported {\n  let r = portable_alternative();\n}","preventionTips":["Document per-platform feature support and gate calls accordingly.","Pin/upgrade the VM version compatible with the features you use.","Write portable fallbacks for optional capabilities.","Test BAML programs on every target runtime (native, WASM, sandbox)."],"tags":["unsupported","feature-gate","platform","stdlib","baml"],"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"}