def handle_errors(self, code, reason, url, method, headers, body, response):
    if (response is None):
        return
    if ('success' in response):
        if (not response['success']):
            error = self.safe_string(response, 'errorCode')
            message = ((self.id + ' ') + self.json(response))
            if (error in self.exceptions):
                ExceptionClass = self.exceptions[error]
                raise ExceptionClass(message)
            else:
                raise ExchangeError(message)
def handle_errors(self, code, reason, url, method, headers, body, response):
    if (response is None):
        return
    if ('success' in response):
        if (not response['success']):
            error = self.safe_string(response, 'errorCode')
            message = ((self.id + ' ') + self.json(response))
            if (error in self.exceptions):
                ExceptionClass = self.exceptions[error]
                raise ExceptionClass(message)
            else:
                raise ExchangeError(message)