BoundaryML/baml · error · anyhow::Error
No parsed value
Error message
No parsed value
What it means
parsed_response_impl could not find a parsed value in either the LLM function response or the expr function response, producing "No parsed value" (also attached as context). The WASM runtime requires a successfully parsed response to compute checks, so absence is fatal for the test result payload.
Solutions
- Check earlier errors in the chain — the real failure is the missing LLM/expr response
- Verify the function call completed successfully before reading parsed results
- Inspect API credentials, timeouts, and retry settings
- Re-run the test with debug logging ([BAML parsed_response_impl] lines)
Defensive patterns
Strategy: fallback
Validate before calling
// only request the parsed test response after confirming the call succeeded
if (!await callCompleted(testId)) throw new Error('call not complete; no parsed value expected yet'); Type guard
const hasParsed = (r) => r && ((r.function_response && r.function_response.parsed) || r.expr_function_response);
Try / catch
try {
const resp = await b.test.getParsedResponse(testId);
} catch (e) {
if (String(e).includes('No parsed value')) {
// fall back to raw response / inspect upstream LLM error
}
throw e;
} Prevention
- Check the LLM call's success status before reading parsed results
- Log upstream failures (auth, rate limits, timeouts) so parsing gaps are explained
- Set explicit retry/timeouts so calls complete rather than abort silently
When it happens
Trigger: Neither func_res nor expr_function_response existed on the test result, or their parsed-value getters returned None; the else branch bails with anyhow!("No parsed value") and .context("No parsed value").
Common situations: The underlying LLM call failed or returned nothing parseable before the test runner tried to serialize the parsed test response for JS; race where the test finished with no output recorded.
Related errors
- Expr function error
- (test constraints internal error)
- ExposedError (formatted via format_last_error_with_details)
- Failed to parse float
- Failed to parse JSON response
AI-assisted analysis of BoundaryML/baml@bd85ce9dee (2026-09-12).
Data as JSON: /api/errors/3becb54f534f43a1.
Report an issue: GitHub.
Appendix: source
Thrown at engine/baml-schema-wasm/src/runtime_wasm/mod.rs:824
expr_response.as_ref().map(|v| format!("{v:?}"))
);
match expr_response {
Ok(value) => {
log::debug!(
"[BAML parsed_response_impl] Using expr function response value"
);
Ok(value)
}
Err(e) => {
log::debug!("[BAML parsed_response_impl] Expr function error: {e}");
Err(anyhow::anyhow!("Expr function error: {}", e))
}
}
} else {
log::debug!(
"[BAML parsed_response_impl] No parsed value found in either response type"
);
Err(anyhow::anyhow!("No parsed value"))
}
}
}
.context("No parsed value")?;
let (flattened_checks, check_count) = serialize_value_counting_checks(parsed_response);
Ok(WasmParsedTestResponse {
value: serde_json::to_string(&flattened_checks)?,
check_count,
explanation: {
let j = parsed_response.explanation_json();
if j.is_empty() {
None
} else {
Some(serde_json::to_string(&j)?)
}
},
})
}View on GitHub (pinned to bd85ce9dee)