Explorar o código

fix requests in error (#5389)

Robert Brennan hai 1 ano
pai
achega
1b8104ba14
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      openhands/runtime/utils/request.py

+ 3 - 1
openhands/runtime/utils/request.py

@@ -32,5 +32,7 @@ def send_request(
             _json = response.json()
         except requests.JSONDecodeError:
             raise e
-        raise RequestHTTPError(e, detail=_json.get('detail')) from e
+        raise RequestHTTPError(
+            e, response=e.response, detail=_json.get('detail')
+        ) from e
     return response