def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
    if (response is None):
        return
    if (code >= 300):
        feedback = ((self.id + ' ') + body)
        exact = self.exceptions['exact']
        errorCode = self.safe_string(response, 'errorCode')
        if (errorCode in exact):
            raise exact[errorCode](feedback)
        else:
            raise ExchangeError(feedback)
    success = self.safe_value(response, 'success', True)
    if (not success):
        feedback = ((self.id + ' ') + body)
        broad = self.exceptions['broad']
        message = self.safe_string_2(response, 'message', 'exception')
        if (message is not None):
            broadKey = self.findBroadlyMatchedKey(broad, message)
            if (broadKey is not None):
                raise broad[broadKey](feedback)
        raise ExchangeError(feedback)
def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
    if (response is None):
        return
    if (code >= 300):
        feedback = ((self.id + ' ') + body)
        exact = self.exceptions['exact']
        errorCode = self.safe_string(response, 'errorCode')
        if (errorCode in exact):
            raise exact[errorCode](feedback)
        else:
            raise ExchangeError(feedback)
    success = self.safe_value(response, 'success', True)
    if (not success):
        feedback = ((self.id + ' ') + body)
        broad = self.exceptions['broad']
        message = self.safe_string_2(response, 'message', 'exception')
        if (message is not None):
            broadKey = self.findBroadlyMatchedKey(broad, message)
            if (broadKey is not None):
                raise broad[broadKey](feedback)
        raise ExchangeError(feedback)