BoundaryML/baml · warning · VmBamlError
unsupported: {message}
Error message
unsupported: {message} What it means
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.
Source
Thrown at baml_language/crates/bex_vm_types/src/errors.rs:128
/// An error value from the BAML standard library. Maps 1:1 to a `baml.errors.*` class.
#[derive(Debug, Error, PartialEq, Clone)]
pub enum VmBamlError {
#[error("invalid argument: {message}")]
InvalidArgument { message: String },
#[error("parse error: {message}")]
ParseError { message: String },
#[error("I/O error: {message}")]
Io { message: String },
#[error("timeout: {message}")]
Timeout {
message: String,
duration_ms: Option<i64>,
},
#[error("unsupported: {message}")]
Unsupported { message: String },
#[error("access error: {message}")]
AccessError { message: String },
#[error("render prompt: {message}")]
RenderPrompt { message: String },
#[error("LLM client error: {message}")]
LlmClient { message: String },
/// An error value from the host language that has no direct BAML
/// representation. The `handle` is the load-bearing field — it
/// references the original host exception object via the
/// process-global host-value table, so the originating runtime can
/// recover the exact native exception on round-trip. The
/// `class_name` / `message` / `language` / `traceback` fields are
/// purely metadata for debugging, logging, and user-facingView on GitHub (pinned to bd85ce9dee)
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.
Example fix
// before
let tz_time = clock.now_in("America/New_York"); // unsupported in this runtime
// after
try {
let tz_time = clock.now_in("America/New_York");
} catch e: baml.errors.Unsupported {
let tz_time = clock.now_utc(); // portable fallback
}
Defensive patterns
Strategy: fallback
Validate before calling
// BAML: check feature availability where exposed
if !std.supports("tz_clock") {
return utc_fallback();
} Try / catch
try {
let r = platform_specific_op();
} catch e: baml.errors.Unsupported {
let r = portable_alternative();
} Prevention
- 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).
When it happens
Trigger: 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).
Common situations: 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.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- unsupported pack target `{target_triple}`
- baml.panics.UserPanic
- baml.errors.InvalidArgument
- parse error: {message}
- I/O error: {message}
AI-assisted analysis of BoundaryML/baml@bd85ce9dee (2026-09-12).
Data as JSON: /api/errors/a2f1edb51b641ff2.
Report an issue: GitHub.