BoundaryML/baml · error · VmBamlError
timeout: {message}
Error message
timeout: {message} What it means
An error value from the BAML standard library, mapping to the `baml.errors.Timeout` class. It is raised when a bounded operation (e.g. an LLM call, I/O with a deadline) exceeds its allotted time; the optional `duration_ms` records the configured limit that was exceeded.
Source
Thrown at baml_language/crates/bex_vm_types/src/errors.rs:122
message: String,
class_name: Option<String>,
language: Option<String>,
},
}
/// 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 BAMLView on GitHub (pinned to bd85ce9dee)
Solutions
- Increase the configured timeout for the operation (fix unit mistakes — ms vs s).
- Catch `baml.errors.Timeout` and retry with backoff, possibly with a longer limit.
- Check the upstream service's latency/health; timeouts often indicate an outage or rate limiting.
- Move long work off the critical path or split it into smaller bounded steps.
Example fix
// before let r = client.call(req, timeout_ms: 500); // too short // after let r = client.call(req, timeout_ms: 30000);
Defensive patterns
Strategy: retry
Validate before calling
// BAML: ensure configured timeout is sane before the call
if timeout_ms <= 0 || timeout_ms > 600000 {
return err("timeout_ms out of range");
} Try / catch
try {
let r = op(args, timeout_ms);
} catch e: baml.errors.Timeout {
let r = retry_with_backoff(op, args, timeout_ms * 2);
} Prevention
- Set timeouts with correct units and generous margins for LLM calls.
- Monitor upstream latency and alert before timeouts become common.
- Implement retries with exponential backoff for idempotent operations.
- Check service status/health endpoints when timeouts spike.
When it happens
Trigger: A stdlib call with an associated timeout/duration parameter runs longer than the configured limit and is aborted; `duration_ms` is populated when a specific limit was configured, `None` when no explicit duration applies.
Common situations: Slow LLM endpoints under load; network calls without generous-enough timeouts in CI; setting timeouts too low (e.g. milliseconds vs seconds confusion) when configuring clients.
Understand the failure class
Background: Request timed out: what client-side request timeouts mean across libraries (Request timed out, TIMED_OUT, APITimeoutError) — this error's family across 39 libraries.
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
Related errors
- Request timed out after {0:?}
- baml.panics.Cancelled
- baml.panics.UserPanic
- baml.errors.InvalidArgument
- parse error: {message}
AI-assisted analysis of BoundaryML/baml@bd85ce9dee (2026-09-12).
Data as JSON: /api/errors/0af661467dfd90c1.
Report an issue: GitHub.