Change exception handling to catch all exceptions

Removed specific exception handling to catch all exceptions.
This commit is contained in:
Aran Yogesh 2026-02-09 13:10:54 -08:00 • committed by GitHub
parent 810bf412e9
commit 770fcd4e1d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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