Exception: SimpleSpotify::Error::BadResponse

Inherits:
StandardError
  • Object
show all
Defined in:
lib/simplespotify/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#bodyObject (readonly)

Returns the value of attribute body.



35
36
37
# File 'lib/simplespotify/errors.rb', line 35

def body
  @body
end

#codeObject (readonly)

Returns the value of attribute code.



35
36
37
# File 'lib/simplespotify/errors.rb', line 35

def code
  @code
end

#messageObject (readonly)

Returns the value of attribute message.



35
36
37
# File 'lib/simplespotify/errors.rb', line 35

def message
  @message
end

#requestObject (readonly)

Returns the value of attribute request.



35
36
37
# File 'lib/simplespotify/errors.rb', line 35

def request
  @request
end