neo4jphp icon indicating copy to clipboard operation
neo4jphp copied to clipboard

Batch supresses error when one of the batch command failed

Open psliwa opened this issue 10 years ago • 1 comments

When in batch you have few operations and one of them failed, the exception is not raised and all batch commands are marked as succeed. I think the source of the bug in in the line https://github.com/jadell/neo4jphp/blob/master/lib/Everyman/Neo4j/Command/Batch/Command.php#L83

200 status is hadcoded, I think it should be something like:


    return $this->base->handleResult(isset($result['code']) ? $result['code'] : 200, $headers, $result);

Propably this won't solve the whole problem, because all operations in batch are executed in single transaction, so if one command fails, all of batch commands should be marked as failed.

psliwa avatar Aug 21 '14 09:08 psliwa

Will be fixed by #117

jadell avatar Aug 22 '14 15:08 jadell