"""Custom exception classes.""" class UpdateProductStatusError(Exception): """Exception raised on product status update error.""" class StoreRequestError(UpdateProductStatusError): """Exception raised on error during request to store.""" class StoreResponseParseError(UpdateProductStatusError): """Exception raised on store response parsing error.""" class SQSMessageConstructionError(Exception): """Exception raised when it's not possible to construct SQS message.""" def __init__(self, response): """Store response object in exception instance. Args: response: oto.response.Response: Response object that contains info about error. """ self.response = response class RateLimitExceeded(Exception): """Exception raised when requests limit for particular store exceeded."""