Skip to content


Neo4j 2.0 REST API: Cypher DELETE query on a Node with existing relationships does not return an error #1902

blevine opened this Issue · 2 comments

3 participants


Please see discussion here:

I've constructed a query that will result in a DELETE on a Node with existing relationships. When executed in the Neo4j browser, this returns an Exception as expected. And I can see a stack trace in console.log that ends with a ConstraintViolationException (also as expected). When I execute this same query via the REST API using the /cypher endpoint I still see the exception in console.log, but no error is returned by the REST API. I'm pretty sure this is a change in behavior as I now have a unit test that is failing against Neo4j 2.0, but is not failing against Neo4j 1.8.x/1.9.x.

Looks like no error is returned (in either HTTP status or payload) only in the streaming case. This is what I'm seeing:

Non-streaming: returns HTTP status 400 and a payload with

{message="Unable to commit transaction","exception":"TransactionFailureException"..."}

Streaming: returns HTTP 200 and payload with


Do we have any update on this issue ? even I am facing this one.

Neo4j member

Verified this has been resolved in latest versions using the following CURL statements:

    curl -X POST http://localhost:7474/db/data/cypher -H "Content-Type: application/json" -d "{\"query\": \"CREATE (n:SomeNode)-[:R]->()\"}"

curl -X POST http://localhost:7474/db/data/transaction/commit -H "Content-Type: application/json" -d "{\"statements\": [{\"statement\": \"MATCH (n:SomeNode) DELETE n\"}]}"

If your issue remains on a recent version of Neo4j, please provide statements like the above to replicate.

@jakewins jakewins closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.