{"action":"created","issue":{"url":"https://api.github.com/repos/neo4j/neo4j/issues/5262","labels_url":"https://api.github.com/repos/neo4j/neo4j/issues/5262/labels{/name}","comments_url":"https://api.github.com/repos/neo4j/neo4j/issues/5262/comments","events_url":"https://api.github.com/repos/neo4j/neo4j/issues/5262/events","html_url":"https://github.com/neo4j/neo4j/issues/5262","id":104215250,"number":5262,"title":"Change in response from the transactional cypher endpoint in 2.2.5 when a transaction could not be committed","user":{"login":"luanne","id":1242476,"avatar_url":"https://avatars.githubusercontent.com/u/1242476?v=3","gravatar_id":"","url":"https://api.github.com/users/luanne","html_url":"https://github.com/luanne","followers_url":"https://api.github.com/users/luanne/followers","following_url":"https://api.github.com/users/luanne/following{/other_user}","gists_url":"https://api.github.com/users/luanne/gists{/gist_id}","starred_url":"https://api.github.com/users/luanne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luanne/subscriptions","organizations_url":"https://api.github.com/users/luanne/orgs","repos_url":"https://api.github.com/users/luanne/repos","events_url":"https://api.github.com/users/luanne/events{/privacy}","received_events_url":"https://api.github.com/users/luanne/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-09-01T08:32:39Z","updated_at":"2015-09-16T11:46:46Z","closed_at":"2015-09-16T11:46:46Z","body":"Assume the following cypher statement:\r\n```\r\n{\"statements\":[{\"statement\":\"CREATE (_0:`User`:`Person`{_0_props}) RETURN id(_0) AS _0\",\"parameters\":{\"_0_props\":{\"name\":\"Michal\"}},\"resultDataContents\":[\"row\"],\"includeStats\":false}]}\r\n```\r\nposted to http://localhost:7474/db/data/transaction/1\r\n\r\nIf a transaction cannot be committed (assume a transaction event handler throws an exception), in versions prior to 2.2.5, the response contained an empty `results`.\r\n\r\n```\r\n{\r\n    \"results\": [],\r\n    \"errors\": [\r\n        {\r\n            \"code\": \"Neo.DatabaseError.Statement.ExecutionFailure\",\r\n            \"message\": \"Could not create token\",\r\n            \"stackTrace\": \"org.neo4j.graphdb.TransactionFailureException: Could not create token\\n\\tat org.neo4j.kernel.impl.core.TokenHolder.getOrCreateId(TokenHolder.java:121)\\n\\tat\r\n...\r\n       }\r\n    ]\r\n}\r\n```\r\n\r\nIn 2.2.5, the response includes the id of the node that was supposed to be created but was not:\r\n\r\n```\r\n{\r\n    \"results\": [\r\n        {\r\n            \"columns\": [\r\n                \"_0\"\r\n            ],\r\n            \"data\": [\r\n                {\r\n                    \"row\": [\r\n                        0\r\n                    ]\r\n                }\r\n            ]\r\n        }\r\n    ],\r\n    \"errors\": [\r\n        {\r\n            \"code\": \"Neo.DatabaseError.Transaction.CouldNotCommit\",\r\n            \"message\": \"org.neo4j.kernel.api.exceptions.TransactionFailureException: \",\r\n            \"stackTrace\": \"java.lang.RuntimeException: org.neo4j.kernel.api.exceptions.TransactionFailureException: \\n\\tat\r\n...\r\n        }\r\n     ]\r\n}\r\n```\r\n\r\nThis is quite unexpected- no node with ID 0 exists, yet it's returned!"},"comment":{"url":"https://api.github.com/repos/neo4j/neo4j/issues/comments/140717160","html_url":"https://github.com/neo4j/neo4j/issues/5262#issuecomment-140717160","issue_url":"https://api.github.com/repos/neo4j/neo4j/issues/5262","id":140717160,"user":{"login":"davidegrohmann","id":6573166,"avatar_url":"https://avatars.githubusercontent.com/u/6573166?v=3","gravatar_id":"","url":"https://api.github.com/users/davidegrohmann","html_url":"https://github.com/davidegrohmann","followers_url":"https://api.github.com/users/davidegrohmann/followers","following_url":"https://api.github.com/users/davidegrohmann/following{/other_user}","gists_url":"https://api.github.com/users/davidegrohmann/gists{/gist_id}","starred_url":"https://api.github.com/users/davidegrohmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidegrohmann/subscriptions","organizations_url":"https://api.github.com/users/davidegrohmann/orgs","repos_url":"https://api.github.com/users/davidegrohmann/repos","events_url":"https://api.github.com/users/davidegrohmann/events{/privacy}","received_events_url":"https://api.github.com/users/davidegrohmann/received_events","type":"User","site_admin":false},"created_at":"2015-09-16T11:46:46Z","updated_at":"2015-09-16T11:46:46Z","body":"@luanne @bachmanm As @tinwelint explained above the latest behavior is correct and expected. I am going to close this issue. Please feel free to reopen it if you think this is still an issue."}}