From 281797b827e1ff2cd51254af7a89c83be5c34225 Mon Sep 17 00:00:00 2001 From: aMahanna Date: Thu, 23 Dec 2021 17:30:32 -0500 Subject: [PATCH] initial commit --- arango/connection.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arango/connection.py b/arango/connection.py index d49edfe3..49aa7b67 100644 --- a/arango/connection.py +++ b/arango/connection.py @@ -104,6 +104,8 @@ def prep_response(self, resp: Response, deserialize: bool = True) -> Response: if isinstance(resp.body, dict): resp.error_code = resp.body.get("errorNum") resp.error_message = resp.body.get("errorMessage") + if resp.status_code == resp.error_code == 503: + raise ConnectionError # Fallback to another host else: resp.body = resp.raw_body