BoundaryML/baml · error · anyhow::Error

No response

Error message

No response

What it means

status() found neither an expr-function response, nor a function response, nor any result with constraints on the FunctionResult, so there is nothing to report and the test fails with a bare "No response". This means the test never produced any response object at all.

Solutions

  1. Check upstream LLM call errors/logs — the actual failure happened before a response was produced
  2. Verify the function ran to completion and its result was awaited/stored before calling status()
  3. Inspect API key/network/timeout errors that abort the call before any response is recorded
  4. Re-run the test; if persistent, run with verbose BAML logs
Defensive patterns

Strategy: retry

Validate before calling

// confirm a response exists before reading status
if (!result || (!result.function_response && !result.expr_function_response)) {
  throw new Error('no function response recorded yet');
}

Type guard

const hasResponse = (r) => r != null && ('function_response' in r || 'expr_function_response' in r);

Try / catch

try {
  const status = testResult.status();
} catch (e) {
  if (String(e).includes('No response')) {
    // inspect upstream LLM errors: keys, network, timeouts
  }
  throw e;
}

Prevention

When it happens

Trigger: Calling status() on a FunctionResult where expr_function_response is None, function_response is None, or function_response exists but result_with_constraints() returns None (no parsed result recorded).

Common situations: The LLM call never completed or was cancelled before a response was stored; the function errored before parsing so no parsed value was attached; async test orchestration read the result too early.

Related errors


AI-assisted analysis of BoundaryML/baml@bd85ce9dee (2026-09-12). Data as JSON: /api/errors/ccfcd38c7cae5e76. Report an issue: GitHub.

Appendix: source

Thrown at engine/baml-runtime/src/types/response.rs:492

                            } else {
                                TestStatus::Pass
                            }
                        }
                    }
                } else {
                    let err = parsed.as_ref().unwrap_err();
                    match err.downcast_ref::<crate::errors::ExposedError>() {
                        Some(ExposedError::FinishReasonError { .. }) => {
                            TestStatus::Fail(TestFailReason::TestFinishReasonFailed(err))
                        }
                        _ => TestStatus::Fail(TestFailReason::TestParseFailure(err)),
                    }
                }
            } else {
                TestStatus::Fail(TestFailReason::TestLLMFailure(func_res.llm_response()))
            }
        } else {
            TestStatus::Fail(TestFailReason::TestUnspecified(anyhow::anyhow!(
                "No response"
            )))
        }
    }
}

impl std::fmt::Display for TestFailReason<'_> {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match self {
            Self::TestUnspecified(e) => write!(f, "{e}"),
            Self::TestLLMFailure(r) => write!(f, "{r}"),
            Self::TestParseFailure(e) => write!(f, "{e}"),
            Self::TestFinishReasonFailed(e) => write!(f, "{e}"),
            Self::TestConstraintsFailure {
                checks,
                failed_assert,
            } => {
                for (check, pass) in checks {

View on GitHub (pinned to bd85ce9dee)