def handle_errors(self, httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody):
    if (response is None):
        return
    if ('success' in response):
        success = self.safe_value(response, 'success', False)
        if isinstance(success, str):
            if ((success == 'true') or (success == '1')):
                success = True
            else:
                success = False
        if (not success):
            feedback = ((self.id + ' ') + self.json(response))
            error = self.safe_value(response, 'error')
            if (error is None):
                raise ExchangeError(feedback)
            code = self.safe_string(error, 'code')
            self.throw_exactly_matched_exception(self.exceptions, code, feedback)
            raise ExchangeError(feedback)
def handle_errors(self, httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody):
    if (response is None):
        return
    if ('success' in response):
        success = self.safe_value(response, 'success', False)
        if isinstance(success, str):
            if ((success == 'true') or (success == '1')):
                success = True
            else:
                success = False
        if (not success):
            feedback = ((self.id + ' ') + self.json(response))
            error = self.safe_value(response, 'error')
            if (error is None):
                raise ExchangeError(feedback)
            code = self.safe_string(error, 'code')
            self.throw_exactly_matched_exception(self.exceptions, code, feedback)
            raise ExchangeError(feedback)