New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Return an error object on connection failure #9
Comments
Could be either |
|
I stumbled on destroying response object before calling Should this behavior be fixed as well? |
Yes |
https://github.com/sindresorhus/got/blob/master/index.js#L64. Could set a custom property (
.resCode
) with the error code and supply a user friendly error message likeCouldn't connect to http://github.com (code 500)
.The
resCode
property would need to be well documented since many will want too look for it.The text was updated successfully, but these errors were encountered: