Merge "Add exception for policy deleted objects"
This commit is contained in:
commit
d1a543bca0
|
@ -35,7 +35,8 @@ def http_error_to_exception(status_code, error_code):
|
||||||
{'202': exceptions.BackendResourceNotFound,
|
{'202': exceptions.BackendResourceNotFound,
|
||||||
'default': exceptions.ResourceNotFound},
|
'default': exceptions.ResourceNotFound},
|
||||||
requests.codes.BAD_REQUEST:
|
requests.codes.BAD_REQUEST:
|
||||||
{'60508': exceptions.NsxIndexingInProgress},
|
{'60508': exceptions.NsxIndexingInProgress,
|
||||||
|
'500045': exceptions.NsxPendingDelete},
|
||||||
requests.codes.CONFLICT: exceptions.StaleRevision,
|
requests.codes.CONFLICT: exceptions.StaleRevision,
|
||||||
requests.codes.PRECONDITION_FAILED: exceptions.StaleRevision,
|
requests.codes.PRECONDITION_FAILED: exceptions.StaleRevision,
|
||||||
requests.codes.INTERNAL_SERVER_ERROR:
|
requests.codes.INTERNAL_SERVER_ERROR:
|
||||||
|
|
|
@ -145,3 +145,9 @@ class NsxSearchInvalidQuery(NsxLibException):
|
||||||
class NsxIndexingInProgress(NsxLibException):
|
class NsxIndexingInProgress(NsxLibException):
|
||||||
message = _("Bad Request due to indexing is in progress, please retry "
|
message = _("Bad Request due to indexing is in progress, please retry "
|
||||||
"after sometime")
|
"after sometime")
|
||||||
|
|
||||||
|
|
||||||
|
class NsxPendingDelete(NsxLibException):
|
||||||
|
message = _("An object with the same name is marked for deletion. Either "
|
||||||
|
"use another path or wait for the purge cycle to permanently "
|
||||||
|
"remove the deleted object")
|
||||||
|
|
Loading…
Reference in New Issue