Skip to content

Commit

Permalink
fix: Use _send_action_server_request in send_action_for_execution
Browse files Browse the repository at this point in the history
This ensures that all requests go through the proper error handling path,
including the 502 error handling that converts the error to a more helpful
AgentRuntimeDisconnectedError message.

Fixes #5601
  • Loading branch information
openhands-agent committed Jan 1, 2025
1 parent 2ec2f25 commit a31f5e0
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,7 @@ def send_action_for_execution(self, action: Action) -> Observation:
assert action.timeout is not None

try:
with send_request(
self.session,
with self._send_action_server_request(
'POST',
f'{self._get_action_execution_server_host()}/execute_action',
json={'action': event_to_dict(action)},
Expand Down

0 comments on commit a31f5e0

Please sign in to comment.