Show proper error on over quota commands
Change-Id: I811a0f0e3dcc3406ba9a07b0d54788a3241a7cd2 Closes-Bug: #1629222
This commit is contained in:
parent
fad4e0ff58
commit
f540d1c09b
@ -78,3 +78,7 @@ class Conflict(RemoteError):
|
||||
|
||||
class NotFound(RemoteError):
|
||||
pass
|
||||
|
||||
|
||||
class OverQuota(RemoteError):
|
||||
pass
|
||||
|
@ -93,6 +93,8 @@ class DesignateAdapter(adapter.LegacyJsonAdapter):
|
||||
raise exceptions.NotFound(**response_payload)
|
||||
elif response.status_code == 409:
|
||||
raise exceptions.Conflict(**response_payload)
|
||||
elif response.status_code == 413:
|
||||
raise exceptions.OverQuota(**response_payload)
|
||||
elif response.status_code >= 500:
|
||||
raise exceptions.Unknown(**response_payload)
|
||||
return response, body
|
||||
|
Loading…
x
Reference in New Issue
Block a user