thomasdavis / w3cjs

A npm package for testing files or url's again the wc3 validator
http://thomasdavis.github.com/w3cjs/
The Unlicense
159 stars 25 forks source link

Missing HTTP error handling #25

Open TheHalcyonSavant opened 8 years ago

TheHalcyonSavant commented 8 years ago

I can't find the superagent error callback, it seems it's forgotten the usage of err parameter here. Do you accept PR for this?

alebell commented 8 years ago

I wanted to report this too. It would be great if the error handling could be implemented properly.

callumacrae commented 8 years ago

A PR would be good! :smile:

backflip commented 8 years ago

Would you prefer changing the API to expect callback: function(err, res) or keep callback: function(res) and let the consumer check whether res is of type Error?

backflip commented 7 years ago

@callumacrae, which approach would you prefer?

jhermsmeier commented 7 years ago

HTTP request error handling has been added in #32 (published as 0.3.1) – the callback will get an error as its first argument, i.e. callback: function(error, res) now