Exception: Harvest::HTTPError
- Inherits:
-
StandardError
- Object
- StandardError
- Harvest::HTTPError
- Defined in:
- lib/harvest/errors.rb
Direct Known Subclasses
AuthenticationFailed, BadRequest, InformHarvest, NotFound, RateLimited, ServerError, Unavailable
Instance Attribute Summary (collapse)
-
- (Object) params
readonly
Returns the value of attribute params.
-
- (Object) response
readonly
Returns the value of attribute response.
Instance Method Summary (collapse)
-
- (HTTPError) initialize(response, params = {})
constructor
A new instance of HTTPError.
- - (Object) to_s
Constructor Details
- (HTTPError) initialize(response, params = {})
A new instance of HTTPError
8 9 10 11 12 |
# File 'lib/harvest/errors.rb', line 8 def initialize(response, params = {}) @response = response @params = params super(response) end |
Instance Attribute Details
- (Object) params (readonly)
Returns the value of attribute params
6 7 8 |
# File 'lib/harvest/errors.rb', line 6 def params @params end |
- (Object) response (readonly)
Returns the value of attribute response
5 6 7 |
# File 'lib/harvest/errors.rb', line 5 def response @response end |
Instance Method Details
- (Object) to_s
14 15 16 |
# File 'lib/harvest/errors.rb', line 14 def to_s "#{self.class.to_s} : #{response.code} #{response.body}" end |