Class: SpotifyWebApi::NotFoundException
- Inherits:
-
APIException
- Object
- CoreLibrary::ApiException
- APIException
- SpotifyWebApi::NotFoundException
- Defined in:
- lib/spotify_web_api/exceptions/not_found_exception.rb
Overview
NotFound class.
Instance Attribute Summary collapse
-
#error ⇒ ErrorObject
TODO: Write general description for this method.
Instance Method Summary collapse
-
#initialize(reason, response) ⇒ NotFoundException
constructor
The constructor.
-
#unbox(hash) ⇒ Object
Populates this object by extracting properties from a hash.
Constructor Details
#initialize(reason, response) ⇒ NotFoundException
The constructor.
19 20 21 22 23 |
# File 'lib/spotify_web_api/exceptions/not_found_exception.rb', line 19 def initialize(reason, response) super(reason, response) hash = APIHelper.json_deserialize(@response.raw_body) unbox(hash) end |
Instance Attribute Details
#error ⇒ ErrorObject
TODO: Write general description for this method
14 15 16 |
# File 'lib/spotify_web_api/exceptions/not_found_exception.rb', line 14 def error @error end |
Instance Method Details
#unbox(hash) ⇒ Object
Populates this object by extracting properties from a hash. response body.
28 29 30 |
# File 'lib/spotify_web_api/exceptions/not_found_exception.rb', line 28 def unbox(hash) @error = ErrorObject.from_hash(hash['error']) if hash['error'] end |