-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 error messages stacks only contain functions in node-postgres #1794
Comments
It’s a Node.js issue, see |
Huh. Yeah, I suppose it is due to nodejs/node#11865 ultimately. But I do wonder if there's a workaround, since it's quite simple to wrap |
I’m not a maintainer so I can’t say for certain, but I think this shouldn’t be handled in this library. It has actually been fixed in Node v12 (atm behind a feature flag I think) so I’d recommend your own workaround for now. Once again, just my opinion :) |
Yeah, if the only way to do it is to wrap it using something like VError on the package-level, I could see how the package would rather avoid that. Still, I'm curious if a maintainer will chime in, if only for future reference. |
So yeah, my workaround doesn't work. It's an underlying Node issue (that actually has been fixed). So... I'll close this. |
For example
generates the rather unhelpful stack
Note, in particular, the absense of line numbers in my code, only in the
node-postgres
code.It's easy enough to fix this outside of the package. I can just add something like
and then we get the error info.
I'm guessing this has something to do with the error being thrown by a listener or something (?)?
The text was updated successfully, but these errors were encountered: