summaryrefslogtreecommitdiff
path: root/openstack_dashboard/exceptions.py
diff options
context:
space:
mode:
authorAna Krivokapic <akrivoka@redhat.com>2014-03-31 13:39:45 +0200
committerAna Krivokapic <akrivoka@redhat.com>2014-04-22 13:39:42 +0200
commit3a8409859fbd8c23289708980964394d2c34cb54 (patch)
tree7975ce47ce7b0263fdad67fce220edcdfd6abafa /openstack_dashboard/exceptions.py
parent9ab450c93d5bd71825317bb2511a50c62da211b7 (diff)
downloadhorizon-3a8409859fbd8c23289708980964394d2c34cb54.tar.gz
Move `Forbidden` exceptions to `RECOVERABLE` group
Previously the Forbidden exceptions raised by clients were classified as UNAUTHORIZED. This classification is not entirely correct, as the UNAUTHORIZED group of exceptions implies that the user should be logged out and forced to log in again. This, however, is not the case with Forbidden exceptions. Thus, it is more appropriate to place the Forbidden exceptions into the RECOVERABLE group. Change-Id: I7e52ed72d66e9d0496bc07036e48c968e7a66c2e Closes-bug: #1299126
Diffstat (limited to 'openstack_dashboard/exceptions.py')
-rw-r--r--openstack_dashboard/exceptions.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/openstack_dashboard/exceptions.py b/openstack_dashboard/exceptions.py
index 949a0ea58..b7591e119 100644
--- a/openstack_dashboard/exceptions.py
+++ b/openstack_dashboard/exceptions.py
@@ -30,16 +30,11 @@ from troveclient import exceptions as troveclient
UNAUTHORIZED = (
keystoneclient.Unauthorized,
- keystoneclient.Forbidden,
cinderclient.Unauthorized,
- cinderclient.Forbidden,
novaclient.Unauthorized,
- novaclient.Forbidden,
glanceclient.Unauthorized,
neutronclient.Unauthorized,
- neutronclient.Forbidden,
heatclient.HTTPUnauthorized,
- heatclient.HTTPForbidden,
troveclient.Unauthorized,
)
@@ -61,19 +56,24 @@ RECOVERABLE = (
keystoneclient.ClientException,
# AuthorizationFailure is raised when Keystone is "unavailable".
keystoneclient.AuthorizationFailure,
+ keystoneclient.Forbidden,
cinderclient.ClientException,
cinderclient.ConnectionError,
+ cinderclient.Forbidden,
novaclient.ClientException,
+ novaclient.Forbidden,
glanceclient.ClientException,
# NOTE(amotoki): Neutron exceptions other than the first one
# are recoverable in many cases (e.g., NetworkInUse is not
# raised once VMs which use the network are terminated).
+ neutronclient.Forbidden,
neutronclient.NeutronClientException,
neutronclient.NetworkInUseClient,
neutronclient.PortInUseClient,
neutronclient.AlreadyAttachedClient,
neutronclient.StateInvalidClient,
swiftclient.ClientException,
+ heatclient.HTTPForbidden,
heatclient.HTTPException,
troveclient.ClientException
)