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

Transactional endpoint error handling #48

Open
johndoe90 opened this issue Aug 29, 2014 · 0 comments
Open

Transactional endpoint error handling #48

johndoe90 opened this issue Aug 29, 2014 · 0 comments

Comments

@johndoe90
Copy link

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.

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

1 participant