karthink / elfeed-tube

Youtube integration for Elfeed, the feed reader for Emacs
The Unlicense
241 stars 11 forks source link

elfeed-tube-curl-enqueue can return a nil :status-code #19

Closed wombatzus closed 1 year ago

wombatzus commented 1 year ago

There are several places where status-code is queried after elfeed-tube-curl-enqueue returns using (= status-code 200) or similar. If status-code is nil then the function errors out with a (wrong-type-argument number-or-marker-p nil).

I experienced this when the invidious server being queried started returning HTTP 301 messages but with a nil :status-code. Unfortunately the error is signaled before the error handling is set up, so it never gets a chance to try rotating the server list. Had to manually rotate the server list to get out of the bad state.

karthink commented 1 year ago

Thanks for figuring out the problem! In 0b832146 I changed the = tests to equal which shouldn't fail on nil. This fixes the symptom (the error handling should kick in automatically) but not the root cause -- I'm not sure why the status code is nil.

wombatzus commented 1 year ago

Excellent, thank you. It was a pain in the ass to figure out :)

karthink commented 1 year ago

Again, I appreciate the effort. 👍