Skip to content

Commit 75a6514

Browse files
author
Dylan Huang
committed
include details of error in message
1 parent 0e44e6c commit 75a6514

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

eval_protocol/pytest/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ async def execute_row_with_backoff(task: asyncio.Task, row: EvaluationRow) -> Ev
318318
return row
319319
else:
320320
# Non-retryable exception - fail immediately
321-
row.rollout_status = Status.rollout_error(str(e))
321+
row.rollout_status = Status.rollout_error(repr(e))
322322
return row
323323

324324
async def execute_row_with_backoff_and_log(task: asyncio.Task, row: EvaluationRow) -> EvaluationRow:

tests/pytest/test_pytest_propagate_error.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,8 @@ def eval_fn(row: EvaluationRow) -> EvaluationRow:
6161
# assert that the status of eval_metadata.status is "error"
6262
assert len(rollouts) == 5
6363
assert all(row.eval_metadata.status.is_error() for row in rollouts.values())
64+
65+
# make sure the error message includes details of the error
66+
assert all("HTTPStatusError" in row.rollout_status.message for row in rollouts.values())
67+
assert all("405 Method Not Allowed" in row.rollout_status.message for row in rollouts.values())
68+
assert all("https://docs.fireworks.ai/mcp-non-existent" in row.rollout_status.message for row in rollouts.values())

0 commit comments

Comments
 (0)