Skip to content

Commit 8a3cfe3

Browse files
aMahannajoowani
authored andcommitted
initial commit
1 parent 25d8038 commit 8a3cfe3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arango/connection.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ def prep_response(self, resp: Response, deserialize: bool = True) -> Response:
104104
if isinstance(resp.body, dict):
105105
resp.error_code = resp.body.get("errorNum")
106106
resp.error_message = resp.body.get("errorMessage")
107+
if resp.status_code == resp.error_code == 503:
108+
raise ConnectionError # Fallback to another host
107109
else:
108110
resp.body = resp.raw_body
109111

0 commit comments

Comments
 (0)