def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
    if (not response):
        return
    feedback = ((self.id + ' ') + body)
    if (code == 503):
        raise ExchangeNotAvailable(feedback)
    message = self.safe_string(response, 'message')
    errorCode = self.safe_string_2(response, 'code', 'error_code')
    nonEmptyMessage = ((message is not None) and (message != ''))
    nonZeroErrorCode = ((errorCode is not None) and (errorCode != '0'))
    if nonEmptyMessage:
        self.throw_exactly_matched_exception(self.exceptions['exact'], message, feedback)
        self.throw_broadly_matched_exception(self.exceptions['broad'], message, feedback)
    if nonZeroErrorCode:
        self.throw_exactly_matched_exception(self.exceptions['exact'], errorCode, feedback)
    if (nonZeroErrorCode or nonEmptyMessage):
        raise ExchangeError(feedback)
def handle_errors(self, code, reason, url, method, headers, body, response, requestHeaders, requestBody):
    if (not response):
        return
    feedback = ((self.id + ' ') + body)
    if (code == 503):
        raise ExchangeNotAvailable(feedback)
    message = self.safe_string(response, 'message')
    errorCode = self.safe_string_2(response, 'code', 'error_code')
    nonEmptyMessage = ((message is not None) and (message != ))
    nonZeroErrorCode = ((errorCode is not None) and (errorCode != '0'))
    if nonEmptyMessage:
        self.throw_exactly_matched_exception(self.exceptions['exact'], message, feedback)
        self.throw_broadly_matched_exception(self.exceptions['broad'], message, feedback)
    if nonZeroErrorCode:
        self.throw_exactly_matched_exception(self.exceptions['exact'], errorCode, feedback)
    if (nonZeroErrorCode or nonEmptyMessage):
        raise ExchangeError(feedback)