Skip to content

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

@psliwa

Description

@psliwa

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions