From a2b2611a4babaade1be6caea05ea7750ae753163 Mon Sep 17 00:00:00 2001 From: Robert Brennan Date: Tue, 31 Dec 2024 09:14:44 -0500 Subject: [PATCH] handle auth exception --- openhands/controller/agent_controller.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openhands/controller/agent_controller.py b/openhands/controller/agent_controller.py index 9f1600ecc81e..6579d39426be 100644 --- a/openhands/controller/agent_controller.py +++ b/openhands/controller/agent_controller.py @@ -208,6 +208,8 @@ async def _step_with_exception_handling(self): reported = RuntimeError( 'There was an unexpected error while running the agent.' ) + if isinstance(e, litellm.AuthenticationError): + reported = e await self._react_to_exception(reported) def should_step(self, event: Event) -> bool: