Exception: Redd::ResponseError
- Inherits:
-
StandardError
- Object
- StandardError
- Redd::ResponseError
- Defined in:
- lib/redd/error.rb
Overview
Represents an error from reddit returned in a response.
Direct Known Subclasses
AuthenticationError, BadRequest, Forbidden, InsufficientScope, InvalidAccess, NotFound, ServerError, TooManyRequests
Instance Attribute Summary collapse
-
#response ⇒ Object
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(response) ⇒ ResponseError
constructor
A new instance of ResponseError.
Constructor Details
#initialize(response) ⇒ ResponseError
Returns a new instance of ResponseError.
22 23 24 25 |
# File 'lib/redd/error.rb', line 22 def initialize(response) super(response.raw_body.length <= 80 ? response.raw_body : "#{response.raw_body[0..80]}...") @response = response end |
Instance Attribute Details
#response ⇒ Object
Returns the value of attribute response.
20 21 22 |
# File 'lib/redd/error.rb', line 20 def response @response end |