-
Notifications
You must be signed in to change notification settings - Fork 34
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
connection-related errors could provide more information #104
Comments
@DonutEspresso mind taking a look? |
@davepacheco That's a great idea. It's been on my TODO list to remove restify-error's context object implementation now that verror supports the same via the info object. In lieu of refactoring restify-errors right now, though, the quickest thing is probably to use verror directly within this module to capture lower level errors and their context, and then use those verrors as a cause for the top level http error. The top level http errors come from restify-errors, which currently inherit from WError. So the two gotchas with this approach would be:
Let me know what you think. |
Today, we seem to be getting the ConnectTimeoutError straight out of this repo: Lines 94 to 102 in d415994
Line 142 in d415994
rather than from restify-errors. |
Oops, apologies for the brain fart, guess I haven't been in the code very recently. That actually kind of works out, we should be able to just VError directly then. Unfortunately I won't have time to tackle this until probably a week or two down the road - but if it's pressing feel free to file a PR! |
Thanks. No problem! I likely wouldn't get to it before then, and I wasn't sure how best to get that information out without duplicating the logic in Node. |
I believe this is all addressed by #109. Feel free to let us know if that's not the case. We'll be releasing 2.x shortly. |
For example, when we get ConnectionTimeoutErrors, all we get is:
There are a couple of issues with this:
What about something more like:
verror is intended to help build up the message in different layers of the stack.
This may sound excessively pedantic, but we run into the queueing and DNS issues kind of a lot and people burn a lot of time on the wrong path thinking that a connect timeout was a timeout attempting to establish a TCP connection.
The text was updated successfully, but these errors were encountered: