asilvestre / haskell-neo4j-rest-client

Haskell neo4j REST client
MIT License
25 stars 7 forks source link

TransactionFailureException is considered a TransError? #23

Open martyall1 opened 8 years ago

martyall1 commented 8 years ago

I'm having trouble getting proper error reporting-- when I try to delete a node which has dangling connections to other nodes in the Neo4j browser client, I get an exception of type TransactionFailureException indicating that this is not possible. However, with the neo4j haskell client the same query returns a Result type, not a TransError, which falsely indicates that the node was deleted. Is this supposed to be like this?

martyall1 commented 8 years ago

I'm not really that familiar with the Neo4j REST api, but could it be because of the fact that two requests and responses seem to be generated with every call from the haskell client?

I'll attach a snapshot from the HTTP logging, but the protocol seems to be something like:

Haskell client sends a POST request with the query statement Neo4j responds with a JSON object containing an address to use to call back and check on the transaction, along with a response property and an errors property.

Haskell sends a request to the address from the first response Neo4j sends a response JSON object containing two properties, results and errors

it seems to me that the Haskell client might only be reporting back about the first one?

screen shot 2016-04-12 at 6 09 29 pm
asilvestre commented 8 years ago

Hi, sorry for the delay answering, this clearly looks like a bug I'll try to find some time in the next three or four days to have a look at it.