Merge "Add ResourceTypeNotFound exception"

This commit is contained in:
Jenkins 2016-11-13 20:28:13 +00:00 committed by Gerrit Code Review
commit 39cb2cee8c
1 changed files with 6 additions and 1 deletions

View File

@ -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]