Meaningful Exception for over-quota on domains

This patch makes meaningful exception to be thrown
when over-quota on domains is found.

Change-Id: I98c7e41bc14eb758f45bc4d35dd12c0bd98e1b2b
Closes-Bug: #1463488
This commit is contained in:
sonu.kumar 2015-09-09 11:44:33 +05:30
parent 9803b87a31
commit 519c18f92e

View File

@ -127,7 +127,7 @@ class Client(object):
if response.status_code == 400: if response.status_code == 400:
raise exceptions.BadRequest(**response_payload) raise exceptions.BadRequest(**response_payload)
elif response.status_code in (401, 403): elif response.status_code in (401, 403, 413):
raise exceptions.Forbidden(**response_payload) raise exceptions.Forbidden(**response_payload)
elif response.status_code == 404: elif response.status_code == 404:
raise exceptions.NotFound(**response_payload) raise exceptions.NotFound(**response_payload)