Skip to content
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 errors don't propagate to Query callback #25

Open
allenc256 opened this issue Feb 14, 2014 · 2 comments
Open

Connection errors don't propagate to Query callback #25

allenc256 opened this issue Feb 14, 2014 · 2 comments

Comments

@allenc256
Copy link

Looking at query.coffee, it looks like if the underlying connection emits an 'error' event (e.g., because of network connectivity issues), the error event never makes it to the callback on Query. Is this intentional?

Basically, I'm using the callback API and was expecting this to catch all errors, but it isn't. My workaround is to also add a listener on 'error' to the connection, but seems like the API would be nicer if users didn't have to do this ...

@wvanbergen
Copy link
Owner

Some errors are thrown on the connection, while others are thrown on the query. What is the actual code you are using?

@wvanbergen
Copy link
Owner

That being said, the error handling in this library certainly could be improved. However, this issue is a bit vague for me to act upon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants