From 1fd959a665c3dd160287ce80d45d2b082d128141 Mon Sep 17 00:00:00 2001 From: Romuald Juchnowicz-Bierbasz Date: Fri, 10 May 2019 13:50:46 +0200 Subject: [PATCH] Handle ServerDisconnectedError --- setup.py | 2 +- src/galaxy/http.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index d50ec98..6ec387e 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup, find_packages setup( name="galaxy.plugin.api", - version="0.26", + version="0.27", description="Galaxy python plugin API", author='Galaxy team', author_email='galaxy@gog.com', diff --git a/src/galaxy/http.py b/src/galaxy/http.py index 2f984e6..7973e64 100644 --- a/src/galaxy/http.py +++ b/src/galaxy/http.py @@ -27,6 +27,8 @@ class AuthenticatedHttpClient: raise BackendTimeout() except aiohttp.ClientConnectionError: raise NetworkError() + except aiohttp.ServerDisconnectedError: + raise BackendNotAvailable() if response.status == HTTPStatus.UNAUTHORIZED: raise AuthenticationRequired() if response.status == HTTPStatus.FORBIDDEN: