Skip to content

Commit 2bbd53a

Browse files
committed
fix err msg
1 parent 1545c63 commit 2bbd53a

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

eval_protocol/mcp/execution/manager.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
from dataclasses import asdict
1515
from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, Union
1616

17+
import anyio
18+
import httpx
1719
from openai.types import CompletionUsage
1820

1921
from vendor.tau2.data_model.message import AssistantMessage, UserMessage
@@ -463,12 +465,13 @@ async def _execute_rollout(
463465
f"✅ Rollout {rollout_idx} completed: {trajectory.steps} steps, reward: {trajectory.total_reward:.2f}, termination: {trajectory.termination_reason}, in thread {threading.current_thread().name}"
464466
)
465467

466-
except asyncio.CancelledError:
468+
except asyncio.CancelledError as e:
467469
logger.error(f"🚨 AsyncIO Cancel Error in roll out {rollout_idx}", exc_info=True)
468-
failure_reason = "asyncio context cancelled"
470+
failure_reason = str(e)
469471
except Exception as e:
472+
error_msg = str(e) if str(e) else f"{type(e).__name__}: Rollout Failed"
470473
logger.error(f"🚨 Error in rollout {rollout_idx}: {e}", exc_info=True)
471-
failure_reason = str(e)
474+
failure_reason = error_msg
472475
finally:
473476
if failure_reason:
474477
trajectory.terminated = True

0 commit comments

Comments
 (0)