Skip to content

Commit

Permalink
Update agent_controller.py
Browse files Browse the repository at this point in the history
  • Loading branch information
rbren authored Jan 2, 2025
1 parent 50f821f commit ef147cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openhands/controller/agent_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ async def _step_with_exception_handling(self):
reported = RuntimeError(
'There was an unexpected error while running the agent.'
)
if isinstance(e, litellm.AuthenticationError):
if isinstance(e, litellm.AuthenticationError) or isinstance(e, litellm.BadRequestError):
reported = e
await self._react_to_exception(reported)

Expand Down

0 comments on commit ef147cb

Please sign in to comment.