Exception: PEClient::HTTPError
- Defined in:
- lib/pe_client/error.rb
Overview
Generic HTTP errors
Direct Known Subclasses
BadRequestError, ConflictError, ForbiddenError, NotFoundError, ServerError, UnauthorizedError
Instance Attribute Summary collapse
-
#response ⇒ Faraday::Response
readonly
The HTTP response that caused the error.
Instance Method Summary collapse
-
#initialize(response, message = nil) ⇒ HTTPError
constructor
A new instance of HTTPError.
Constructor Details
#initialize(response, message = nil) ⇒ HTTPError
Returns a new instance of HTTPError.
30 31 32 33 |
# File 'lib/pe_client/error.rb', line 30 def initialize(response, = nil) @response = response super( || "HTTP #{@response.status} Error: #{@response.body}") end |
Instance Attribute Details
#response ⇒ Faraday::Response (readonly)
The HTTP response that caused the error.
25 26 27 |
# File 'lib/pe_client/error.rb', line 25 def response @response end |