moto/moto/ecs/exceptions.py

68 lines
1.7 KiB
Python
Raw Normal View History

from moto.core.exceptions import RESTError, JsonRESTError
class ServiceNotFoundException(RESTError):
code = 400
def __init__(self):
super().__init__(
error_type="ServiceNotFoundException", message="Service not found."
2018-10-30 22:09:47 -04:00
)
class TaskDefinitionNotFoundException(JsonRESTError):
code = 400
def __init__(self):
super().__init__(
error_type="ClientException",
message="The specified task definition does not exist.",
)
class RevisionNotFoundException(JsonRESTError):
code = 400
def __init__(self):
2022-03-10 13:39:59 -01:00
super().__init__(error_type="ClientException", message="Revision is missing.")
class TaskSetNotFoundException(JsonRESTError):
code = 400
def __init__(self):
super().__init__(
error_type="ClientException",
message="The specified task set does not exist.",
)
class ClusterNotFoundException(JsonRESTError):
code = 400
def __init__(self):
super().__init__(
2022-03-10 13:39:59 -01:00
error_type="ClusterNotFoundException", message="Cluster not found."
)
class EcsClientException(JsonRESTError):
code = 400
def __init__(self, message):
2022-03-10 13:39:59 -01:00
super().__init__(error_type="ClientException", message=message)
class InvalidParameterException(JsonRESTError):
code = 400
def __init__(self, message):
2022-03-10 13:39:59 -01:00
super().__init__(error_type="InvalidParameterException", message=message)
class UnknownAccountSettingException(InvalidParameterException):
def __init__(self):
super().__init__(
"unknown should be one of [serviceLongArnFormat,taskLongArnFormat,containerInstanceLongArnFormat,containerLongArnFormat,awsvpcTrunking,containerInsights,dualStackIPv6]"
)