Skip to content
This repository has been archived by the owner on Aug 6, 2018. It is now read-only.

throwing exception is not a valid spotify link URI or pointer #53

Closed
ppcano opened this issue Nov 22, 2011 · 3 comments
Closed

throwing exception is not a valid spotify link URI or pointer #53

ppcano opened this issue Nov 22, 2011 · 3 comments
Labels

Comments

@ppcano
Copy link

ppcano commented Nov 22, 2011

Getting image URI throws an exception in some edge cases ( ex: spotify:album:3JFryzZ2dByJ7Z2Ik2fVua)

album.cover(false).to_str

<Spotify::Pointer address=0x00000000000000> is not a valid spotify link URI or pointer

~/.rvm/gems/ruby-1.9.2-p180/gems/hallon-0.9.0/lib/hallon/base.rb:77:in to_pointer' ~/.rvm/gems/ruby-1.9.2-p180/gems/hallon-0.9.0/lib/hallon/link.rb:31:ininitialize'
~/.rvm/gems/ruby-1.9.2-p180/gems/hallon-0.9.0/lib/hallon/album.rb:90:in new' ~/.rvm/gems/ruby-1.9.2-p180/gems/hallon-0.9.0/lib/hallon/album.rb:90:incover'

@Burgestrand
Copy link
Owner

Thanks for the report; I’ll look at it once I get home in ~2 hours!

@Burgestrand
Copy link
Owner

Actually. I know what’s causing this. The fix is easy, but I believe there might be more places where this error might appear in. I’ll see if I can release a minor version of Hallon to fix this issue tonight.

Essentially, this line needs to be changed:

Link.new(link)

I’d like to add a test for it as well however, so it’ll have to wait until I get home.

@Burgestrand
Copy link
Owner

Released v0.9.1 for Hallon with this fix (amongst other things): https://rubygems.org/gems/hallon/versions/0.9.1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants