fix: resolve merge conflict in tool_error_handler.py

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
aran-yogesh 2026-02-09 13:39:37 -08:00
parent 823291f841
commit 1104f494ee

View file

@ -78,7 +78,7 @@ class ToolErrorMiddleware(AgentMiddleware):
) -> ToolMessage | Command:
try:
return handler(request)
except Exception as e:
except Exception as e:
logger.exception("Error during tool call handling; request=%r", request)
data = _to_error_payload(e, request)
return ToolMessage(
@ -94,7 +94,7 @@ class ToolErrorMiddleware(AgentMiddleware):
) -> ToolMessage | Command:
try:
return await handler(request)
except Exception as e:
except Exception as e:
logger.exception("Error during tool call handling; request=%r", request)
data = _to_error_payload(e, request)
return ToolMessage(