From e2fd339f355fecd3f84a0487ed4e750888b199a5 Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Mon, 12 Dec 2016 11:27:18 +0100 Subject: [PATCH] Catch auth errors when adding a compute Fix #813 --- gns3server/controller/compute.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gns3server/controller/compute.py b/gns3server/controller/compute.py index 5c367d43..da720c20 100644 --- a/gns3server/controller/compute.py +++ b/gns3server/controller/compute.py @@ -370,6 +370,8 @@ class Compute: return except aiohttp.web.HTTPNotFound: raise aiohttp.web.HTTPConflict(text="The server {} is not a GNS3 server or it's a 1.X server".format(self._id)) + except aiohttp.web.HTTPUnauthorized: + raise aiohttp.web.HTTPConflict(text="Invalid auth for server {} ".format(self._id)) if "version" not in response.json: self._http_session.close()