Exception: X::ClientError

Inherits:
HTTPError show all
Defined in:
x-core/lib/x/core/errors/client_error.rb

Overview

The base class of the errors of a 4xx response, which the API refused

The request is the reason it was refused, so sending it again unchanged is refused again. TooManyRequests and RequestTimeout are the exceptions: the same request passes once its rate limit resets, or once the API reads it in time.

Examples:

Tell a request the API refused from a failure of the API

rescue X::ClientError => e
  logger.warn("#{e.status}: #{e.message}")

Constructor Details

This class inherits a constructor from X::HTTPError