[docs]class ServiceException(Exception):
pass
[docs]class ErrInstanceAlreadyExists(ServiceException):
def __init__(self):
super().__init__("Instance already exists")
[docs]class ErrInstanceDoesNotExist(ServiceException):
def __init__(self):
super().__init__("Instance does not exist")
[docs]class ErrInstanceLimitMet(ServiceException):
def __init__(self):
super().__init__("Instance limit for this service has been reached")
[docs]class ErrPlanQuotaExceeded(ServiceException):
def __init__(self):
super().__init__("The quota for this service plan has been exceeded. Please contact your Operator for help.")
[docs]class ErrServiceQuotaExceeded(ServiceException):
def __init__(self):
super().__init__("The quota for this service has been exceeded. Please contact your Operator for help.")
[docs]class ErrBindingAlreadyExists(ServiceException):
def __init__(self):
super().__init__("Binding already exists")
[docs]class ErrBindingDoesNotExist(ServiceException):
def __init__(self):
super().__init__("Binding does not exist")
[docs]class ErrInvalidParameters(ServiceException):
def __init__(self, msg):
super().__init__(msg)
[docs]class ErrAsyncRequired(ServiceException):
def __init__(self):
super().__init__("This service plan requires client support for asynchronous service operations.")
[docs]class ErrPlanChangeNotSupported(ErrInvalidParameters):
def __init__(self):
super().__init__("The requested plan migration cannot be performed")
[docs]class ErrAppGuidNotProvided(ServiceException):
def __init__(self):
super().__init__("app_guid is a required field but was not provided")
[docs]class ErrConcurrentInstanceAccess(ServiceException):
def __init__(self):
super().__init__("ConcurrencyError")
[docs]class ErrBadRequest(ServiceException):
"""
Raise if malformed or missing mandatory data
"""
def __init__(self, msg="Malformed or missing data"):
super().__init__(msg)