Exception: Lexile::HTTPError
- Defined in:
- lib/lexile/errors.rb
Direct Known Subclasses
AuthenticationFailed, BadRequest, NotFound, ServerError, TooManyRequests, Unavailable, UnknownStatusCode
Instance Attribute Summary collapse
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
- #composed_message ⇒ Object
-
#initialize(response, params = {}) ⇒ HTTPError
constructor
A new instance of HTTPError.
- #to_s ⇒ Object
Constructor Details
#initialize(response, params = {}) ⇒ HTTPError
Returns a new instance of HTTPError.
10 11 12 13 14 |
# File 'lib/lexile/errors.rb', line 10 def initialize(response, params = {}) @response = response @params = params super(response) end |
Instance Attribute Details
#params ⇒ Object (readonly)
Returns the value of attribute params.
8 9 10 |
# File 'lib/lexile/errors.rb', line 8 def params @params end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
7 8 9 |
# File 'lib/lexile/errors.rb', line 7 def response @response end |
Instance Method Details
#composed_message ⇒ Object
16 17 18 |
# File 'lib/lexile/errors.rb', line 16 def "#{self.class.to_s} request_params: #{@params} response_status_code: #{@response.code} response_headers:#{@response.headers}" end |
#to_s ⇒ Object
20 21 22 |
# File 'lib/lexile/errors.rb', line 20 def to_s end |