moto/moto/cognitoidentity/exceptions.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
595 B
Python
Raw Normal View History

from moto.core.exceptions import JsonRESTError
class ResourceNotFoundError(JsonRESTError):
2022-11-01 09:33:01 -01:00
def __init__(self, message: str):
super().__init__(error_type="ResourceNotFoundException", message=message)
class InvalidNameException(JsonRESTError):
message = "1 validation error detected: Value '{}' at 'identityPoolName' failed to satisfy constraint: Member must satisfy regular expression pattern: [\\w\\s+=,.@-]+"
2022-11-01 09:33:01 -01:00
def __init__(self, name: str):
msg = InvalidNameException.message.format(name)
super().__init__(error_type="ValidationException", message=msg)