summaryrefslogtreecommitdiffstats
path: root/kilo/kilo/requests/views/tenants.py
diff options
context:
space:
mode:
Diffstat (limited to 'kilo/kilo/requests/views/tenants.py')
-rw-r--r--kilo/kilo/requests/views/tenants.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/kilo/kilo/requests/views/tenants.py b/kilo/kilo/requests/views/tenants.py
index c8a7fff2..31b17a0b 100644
--- a/kilo/kilo/requests/views/tenants.py
+++ b/kilo/kilo/requests/views/tenants.py
@@ -14,7 +14,7 @@
import logging
import json
import traceback
-
+from keystoneauth1.exceptions import HttpError
from rest_framework import status
from rest_framework.response import Response
from rest_framework.views import APIView
@@ -70,6 +70,9 @@ class Tenants(APIView):
return Response(data=content, status=resp.status_code)
except VimDriverKiloException as e:
return Response(data={'error': e.content}, status=e.status_code)
+ except HttpError as e:
+ logger.error("HttpError: status:%s, response:%s" % (e.http_status, e.response.json()))
+ return Response(data=e.response.json(), status=e.http_status)
except Exception as e:
logger.error(traceback.format_exc())
return Response(data={'error': str(e)},