Skip to content

Transactional endpoint error handling #48

@johndoe90

Description

@johndoe90

Hi,

as described in the documentation (http://docs.neo4j.org/chunked/milestone/rest-api-transactional.html#rest-api-handling-errors) the server always returns a statuscode of 200 or 201. At the moment only the statuscode determines whether an error occured or not, which is pointless because the server only returns "success".
So you should check if the result.body.errors array is empty to verify that no errors occured.
Also in the current implementation if the server returns 404, indicating that the transaction doesnt exist, the callback function gets called -> callback(null, false); // Transaction doesn't exist.
I think if something went wrong with the transaction its better to pass a new error to the callback.

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