These are chat archives for request/request

12th
Oct 2017
elenasch
@elenasch
Oct 12 2017 18:28
When external API responds with status other then 200 (say 401 or 500), I'm expecting the callback for such response to have an err object populate. Instead it comes as null or undefined. The response object does have statusCode and statusMessage, but I have to manually inspect these values vs relying on presence of err object ... why is that ? (my callback function looks like this: function(err, response, body) {...})
Davide De Gennaro
@dege88
Oct 12 2017 23:14
@johnathandinh never happened here, are you using request-promise (or request-promise-native)?