Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Trigger on_failure for 404s #122

Merged
merged 1 commit into from Feb 28, 2013

Conversation

Projects
None yet
3 participants
Contributor

muffinista commented Jul 20, 2012

Unless I'm mistaken, Curl::Easy doesn't actually trigger on_failure for a 404 response. The docs say that it is thrown only for 50x errors, which matches my personal experience, and I've also seen it echoed here: http://stackoverflow.com/questions/10076465/ruby-curb-callbacks-order

This pull request adds an on_complete handler which checks to see if the request threw a 404, and if it did, it will call the passed in on_failure method.

Just stumbled on this issue myself with a dead (404) feed that was not triggering the callbacks. +1

@ezkl ezkl added a commit that referenced this pull request Feb 28, 2013

@ezkl ezkl Merge pull request #122 from muffinista/master
Trigger on_failure for 404s
1e37df0

@ezkl ezkl merged commit 1e37df0 into feedjira:master Feb 28, 2013

Contributor

ezkl commented Feb 28, 2013

Thanks, @muffinista!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment