Update client.js

inside ._invoke
when http.request returns an error
return callback immediately, otherwise app crashes