def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
    if (code == 503):
        raise DDoSProtection(((((((self.id + ' ') + str(code)) + ' ') + reason) + ' ') + body))
    if (response is None):
        return
    if ('code' in response):
        status = self.safe_string(response, 'code')
        if (status == '1'):
            message = self.safe_string(response, 'msg')
            feedback = ((self.id + ' ') + body)
            self.throw_exactly_matched_exception(self.exceptions, message, feedback)
            raise ExchangeError(feedback)
def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
    if (code == 503):
        raise DDoSProtection(((((((self.id + ' ') + str(code)) + ' ') + reason) + ' ') + body))
    if (response is None):
        return
    if ('code' in response):
        status = self.safe_string(response, 'code')
        if (status == '1'):
            message = self.safe_string(response, 'msg')
            feedback = ((self.id + ' ') + body)
            self.throw_exactly_matched_exception(self.exceptions, message, feedback)
            raise ExchangeError(feedback)