Use specific exception to prevent repetition
This commit is contained in:
parent
8eba88d1af
commit
4eb921480e
2 changed files with 17 additions and 7 deletions
|
|
@ -15,6 +15,15 @@ class ResourceNotFoundException(SecretsManagerClientError):
|
|||
)
|
||||
|
||||
|
||||
class SecretNotFoundException(SecretsManagerClientError):
|
||||
def __init__(self):
|
||||
self.code = 404
|
||||
super(SecretNotFoundException, self).__init__(
|
||||
"ResourceNotFoundException",
|
||||
message=u"Secrets Manager can\u2019t find the specified secret."
|
||||
)
|
||||
|
||||
|
||||
class ClientError(SecretsManagerClientError):
|
||||
def __init__(self, message):
|
||||
super(ClientError, self).__init__(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue