From 003ebc0dedac57f7e2d5767039d5cb69b29dd174 Mon Sep 17 00:00:00 2001 From: Xingyao Wang Date: Wed, 19 Feb 2025 12:54:34 -0500 Subject: [PATCH] feat: better error logging for remote runtime (#6805) --- openhands/runtime/impl/remote/remote_runtime.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/openhands/runtime/impl/remote/remote_runtime.py b/openhands/runtime/impl/remote/remote_runtime.py index 70e4217e4718..7e1256d28303 100644 --- a/openhands/runtime/impl/remote/remote_runtime.py +++ b/openhands/runtime/impl/remote/remote_runtime.py @@ -153,6 +153,12 @@ def _check_existing_runtime(self) -> bool: 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