Skip to content

πŸ™Œ OpenHands: AI-Driven Development

standardize error message across remote runtime and eventstream runtime (#4159)

Xingyao Wangd518ca08b7b6
diff --git a/openhands/runtime/client/runtime.py b/openhands/runtime/client/runtime.py
index 32b002f3ea..c665f668b1 100644
--- a/openhands/runtime/client/runtime.py
+++ b/openhands/runtime/client/runtime.py
@@ -429,13 +429,15 @@ class EventStreamRuntime(Runtime):
logger.debug(f'response: {response}')
error_message = response.text
logger.error(f'Error from server: {error_message}')
- obs = ErrorObservation(f'Command execution failed: {error_message}')
+ obs = ErrorObservation(f'Action execution failed: {error_message}')
except requests.Timeout:
logger.error('No response received within the timeout period.')
- obs = ErrorObservation('Command execution timed out')
+ obs = ErrorObservation(
+ f'Action execution timed out after {action.timeout} seconds.'
+ )
except Exception as e:
- logger.error(f'Error during command execution: {e}')
- obs = ErrorObservation(f'Command execution failed: {str(e)}')
+ logger.error(f'Error during action execution: {e}')
+ obs = ErrorObservation(f'Action execution failed: {str(e)}')
self._refresh_logs()
return obs