Stop the bench with a Failure on a run that ended on an api_error without a status
CI / tests (pull_request) Successful in 5m21s

This commit is contained in:
2026-11-22 16:50:51 +01:00
parent e687860824
commit 993295b486
3 changed files with 22 additions and 1 deletions
+1 -1
View File
@@ -48,7 +48,7 @@ def figures(stream: bytes, bug_file: str) -> Figures | None | Failure:
result = next((event for event in reversed(events) if event.get("type") == "result"), None)
if result is None:
return None
if result.get("api_error_status"):
if result.get("api_error_status") or result.get("terminal_reason") == "api_error":
return Failure(f"claude could not use the API: {result.get('result')}")
# {"type": "system", "subtype": "init", "model": "claude-haiku-5-5", "claude_code_version": "2.1.330", ...}
init = next((event for event in events if event.get("subtype") == "init"), {})