Raise appropriate error when secret exists but has no value

This commit is contained in:
Alexander Campbell 2019-10-15 21:57:16 +11:00
commit 381e7b165f
4 changed files with 51 additions and 10 deletions

View file

@ -7,11 +7,11 @@ class SecretsManagerClientError(JsonRESTError):
class ResourceNotFoundException(SecretsManagerClientError):
def __init__(self):
def __init__(self, message):
self.code = 404
super(ResourceNotFoundException, self).__init__(
"ResourceNotFoundException",
"Secrets Manager can't find the specified secret"
message,
)