Exception: SimpleSpotify::Error::BadResponse
- Inherits:
-
StandardError
- Object
- StandardError
- SimpleSpotify::Error::BadResponse
- Defined in:
- lib/simplespotify/errors.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#request ⇒ Object
readonly
Returns the value of attribute request.
Instance Method Summary collapse
-
#initialize(code, body, request) ⇒ BadResponse
constructor
A new instance of BadResponse.
Constructor Details
#initialize(code, body, request) ⇒ BadResponse
Returns a new instance of BadResponse.
36 37 38 39 40 41 |
# File 'lib/simplespotify/errors.rb', line 36 def initialize code, body, request @code = code @message = 'Unreadable JSON data returned from SimpleSpotify API' @request = request @body = body end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
35 36 37 |
# File 'lib/simplespotify/errors.rb', line 35 def body @body end |
#code ⇒ Object (readonly)
Returns the value of attribute code.
35 36 37 |
# File 'lib/simplespotify/errors.rb', line 35 def code @code end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
35 36 37 |
# File 'lib/simplespotify/errors.rb', line 35 def @message end |
#request ⇒ Object (readonly)
Returns the value of attribute request.
35 36 37 |
# File 'lib/simplespotify/errors.rb', line 35 def request @request end |