1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
|
from moto.core.exceptions import JsonRESTError, ServiceException
class SesError(ServiceException):
pass
class MessageRejectedError(SesError):
code = "MessageRejected"
class ConfigurationSetDoesNotExist(SesError):
code = "ConfigurationSetDoesNotExist"
class ConfigurationSetAlreadyExists(SesError):
code = "ConfigurationSetAlreadyExists"
class EventDestinationAlreadyExists(SesError):
code = "EventDestinationAlreadyExists"
class TemplateNameAlreadyExists(SesError):
code = "AlreadyExists"
class ValidationError(SesError):
code = "ValidationError"
class InvalidParameterValue(SesError):
code = "InvalidParameterValue"
class InvalidRenderingParameterException(SesError):
code = "InvalidRenderingParameterException"
class TemplateDoesNotExist(SesError):
code = "TemplateDoesNotExist"
class AlreadyExists(SesError):
code = "AlreadyExists"
class RuleSetDoesNotExist(SesError):
code = "RuleSetDoesNotExist"
class RuleDoesNotExist(SesError):
code = "RuleDoesNotExist"
class CannotDelete(SesError):
code = "CannotDelete"
class InvalidS3ConfigurationException(SesError):
code = "InvalidS3Configuration"
class InvalidSnsTopicException(SesError):
code = "InvalidSnsTopic"
class InvalidLambdaFunctionException(SesError):
code = "InvalidLambdaFunction"
class MissingRenderingAttributeException(SesError):
code = "MissingRenderingAttributeException"
def __init__(self, var: str):
super().__init__(f"Attribute '{var}' is not present in the rendering data.")
class NotFoundException(JsonRESTError):
code = 404
def __init__(self, message: str):
super().__init__("NotFoundException", message)
|