fix: improved error reporting; codex cli would at times fail to figure out how to handle plain-text / JSON errors
fix: working directory should exist, raise error and not try and create one docs: improved API Lookup instructions * test added to confirm failures * chat schema more explicit about file paths
This commit is contained in:
@@ -38,6 +38,8 @@ import asyncio
|
||||
import json
|
||||
from typing import Optional
|
||||
|
||||
from tools.shared.exceptions import ToolExecutionError
|
||||
|
||||
from .base_test import BaseSimulatorTest
|
||||
|
||||
|
||||
@@ -158,7 +160,15 @@ class ConversationBaseTest(BaseSimulatorTest):
|
||||
params["_resolved_model_name"] = model_name
|
||||
|
||||
# Execute tool asynchronously
|
||||
result = loop.run_until_complete(tool.execute(params))
|
||||
try:
|
||||
result = loop.run_until_complete(tool.execute(params))
|
||||
except ToolExecutionError as exc:
|
||||
response_text = exc.payload
|
||||
continuation_id = self._extract_continuation_id_from_response(response_text)
|
||||
self.logger.debug(f"Tool '{tool_name}' returned error payload in-process")
|
||||
if self.verbose and response_text:
|
||||
self.logger.debug(f"Error response preview: {response_text[:500]}...")
|
||||
return response_text, continuation_id
|
||||
|
||||
if not result or len(result) == 0:
|
||||
return None, None
|
||||
|
||||
Reference in New Issue
Block a user