Exception: Polar::HTTPError
- Defined in:
- lib/polar/errors.rb
Overview
HTTP error base class
Direct Known Subclasses
BadGatewayError, BadRequestError, ForbiddenError, GatewayTimeoutError, InternalServerError, MethodNotAllowedError, NotFoundError, ServiceUnavailableError, TooManyRequestsError, UnauthorizedError, UnprocessableEntityError
Instance Attribute Summary
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(response) ⇒ HTTPError
constructor
A new instance of HTTPError.
Constructor Details
#initialize(response) ⇒ HTTPError
Returns a new instance of HTTPError.
18 19 20 21 22 23 24 25 |
# File 'lib/polar/errors.rb', line 18 def initialize(response) @status_code = response.status @headers = response.headers @body = response.body = (response) super(, status_code: @status_code, headers: @headers, body: @body) end |