-
Notifications
You must be signed in to change notification settings - Fork 135
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
No error handling when database is down. #130
Comments
The unhandled exception is on purpose / by design (but we do set a helpful error message): https://github.com/thingdom/node-neo4j/blob/1.1.0/lib/util.coffee#L103-L104 (I'm curious why ENOCONNECT is what you check for though. In all of our testing and experience, the error code is always ECONNREFUSED.) What alternate behavior do you think might make sense? |
I was expecting the error to be passed along the error parameter. Feels to And you are right, it was ECONNREFUSED, I was typing that from memory.
|
Oh, sorry for being unclear — the error is meant to be passed as the async error param. That's not what's happening for you? You're getting a (synchronously) thrown error? Can you tell me how to repro this? If I simply stop Neo4j and attempt to talk to it with node-neo4j, I don't get a synchronously thrown error. |
I pretty much took this from the demo. On query it would throw a sync api.graph = function (query, data, callback) {
On Wed, Jul 30, 2014 at 11:06 AM, Aseem Kishore [email protected]
|
Thanks @pipechang. I will investigate when I get a chance. |
Noting to self: need to investigate if this is still happening with v2. |
Not sure if this has been raised before, but I believe the aren't handlers for when the you can't connect to the database (ie. you turn the database off).
No error is given, it just produces an unhanded exception.
I managed to solve this using request by dealing with the ENOCONNECT response from the neo4j api before doing anything else.
The text was updated successfully, but these errors were encountered: