jadell / neo4jphp

PHP wrapper of the Neo4j REST interface
Other
532 stars 137 forks source link

Batch supresses error when one of the batch command failed #158

Open psliwa opened 10 years ago

psliwa commented 10 years ago

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.

jadell commented 10 years ago

Will be fixed by #117