Merge "Add ResourceTypeNotFound exception"
This commit is contained in:
commit
39cb2cee8c
|
@ -87,6 +87,11 @@ class ResourceNotFound(NotFound, MutipleMeaningException):
|
|||
match = re.compile("Resource .* does not exist")
|
||||
|
||||
|
||||
class ResourceTypeNotFound(NotFound, MutipleMeaningException):
|
||||
message = "Resource type not found"
|
||||
match = re.compile("Resource type .* does not exist")
|
||||
|
||||
|
||||
class ArchivePolicyNotFound(NotFound, MutipleMeaningException):
|
||||
message = "Archive policy not found"
|
||||
match = re.compile("Archive policy .* does not exist")
|
||||
|
@ -167,7 +172,7 @@ _error_classes = [BadRequest, Unauthorized, Forbidden, NotFound,
|
|||
RateLimit, NotImplemented]
|
||||
_error_classes_enhanced = {
|
||||
NotFound: [MetricNotFound, ResourceNotFound, ArchivePolicyRuleNotFound,
|
||||
ArchivePolicyNotFound],
|
||||
ArchivePolicyNotFound, ResourceTypeNotFound],
|
||||
Conflict: [NamedMetricAlreadyExists, ResourceAlreadyExists,
|
||||
ArchivePolicyAlreadyExists,
|
||||
ArchivePolicyRuleAlreadyExists]
|
||||
|
|
Loading…
Reference in New Issue