Skip to content

Improve Request Error Handling #62

@elsbree

Description

@elsbree

When a neo4j server is down for whatever reason, this module doesn't handle the ECONNREFUSED error- the entire node process exits, which makes it very difficult to return an error to the client. I'm working on a PR for this, but here's what I'm thinking of doing:

Change request callback arity from function(result) { to function(err, result) { This lets us catch ECONNREFUSED errors before they cause node to exit. I'll also have to handle the case where result is null in all functions that make HTTP requests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions