Handling errors in an open transaction

If there is an error in a request, the server will roll back the transaction. You can tell if the transaction is still open by inspecting the response for the presence/absence of the transaction key.

Example request

  • POST http://localhost:43573/db/neo4j/tx/13

  • Accept: application/json;charset=UTF-8

  • Content-Type: application/json

{
  "statements" : [ {
    "statement" : "This is not a valid Cypher Statement."
  } ]
}

Example response

  • 200: OK

  • Content-Type: application/json;charset=utf-8

{
  "results" : [ ],
  "errors" : [ {
    "code" : "Neo.ClientError.Statement.SyntaxError",
    "message" : "Invalid input 'This': expected \n  \"RETURN\"\n  \"CREATE\"\n  \"DELETE\"\n  \"SET\"\n  \"REMOVE\"\n  \"DETACH\"\n  \"MATCH\"\n  \"WITH\"\n  \"UNWIND\"\n  \"USE\"\n  \"CALL\"\n  \"LOAD\"\n  \"FROM\"\n  \"FOREACH\"\n  \"MERGE\"\n  \"OPTIONAL\"\n  \"USING\" (line 1, column 1 (offset: 0))\n\"This is not a valid Cypher Statement.\"\n ^"
  } ],
  "commit" : "http://localhost:43573/db/neo4j/tx/13/commit"
}