Skip to content

πŸ™Œ OpenHands: AI-Driven Development

feat: better error logging for remote runtime (#6805)

Xingyao Wang003ebc0dedac
diff --git a/openhands/runtime/impl/remote/remote_runtime.py b/openhands/runtime/impl/remote/remote_runtime.py
index 70e4217e47..7e1256d283 100644
--- a/openhands/runtime/impl/remote/remote_runtime.py
+++ b/openhands/runtime/impl/remote/remote_runtime.py
@@ -153,6 +153,12 @@ class RemoteRuntime(ActionExecutionClient):
return False
self.log('debug', f'Error while looking for remote runtime: {e}')
raise
+ except requests.exceptions.JSONDecodeError as e:
+ self.log(
+ 'error',
+ f'Invalid JSON response from runtime API: {e}. URL: {self.config.sandbox.remote_runtime_api_url}/sessions/{self.sid}. Response: {response}',
+ )
+ raise
if status == 'running':
return True