fix requests in error (#5389)

This commit is contained in:
Robert Brennan
2024-12-03 12:38:08 -05:00
committed by GitHub
parent f07a4c6074
commit 1b8104ba14

View File

@@ -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