Open TheHalcyonSavant opened 8 years ago
I wanted to report this too. It would be great if the error handling could be implemented properly.
A PR would be good! :smile:
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
?
@callumacrae, which approach would you prefer?
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
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?