File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 3030use Laudis \Neo4j \Contracts \FormatterInterface ;
3131use Laudis \Neo4j \Databags \BookmarkHolder ;
3232use Laudis \Neo4j \Databags \DatabaseInfo ;
33+ use Laudis \Neo4j \Databags \Neo4jError ;
3334use Laudis \Neo4j \Enum \AccessMode ;
3435use Laudis \Neo4j \Enum \ConnectionProtocol ;
3536use Laudis \Neo4j \Exception \Neo4jException ;
@@ -402,7 +403,11 @@ private function assertNoFailure(Response $response): void
402403 {
403404 if ($ response ->signature === Signature::FAILURE ) {
404405 $ this ->logger ?->log(LogLevel::ERROR , 'FAILURE ' );
405- $ this ->protocol ()->reset ()->getResponse (); // what if the reset fails? what should be expected behaviour?
406+ $ resetResponse = $ this ->protocol ()->reset ()->getResponse ();
407+ $ this ->subscribedResults = [];
408+ if ($ resetResponse ->signature === Signature::FAILURE ) {
409+ throw new Neo4jException ([Neo4jError::fromBoltResponse ($ resetResponse ), Neo4jError::fromBoltResponse ($ response )]);
410+ }
406411 throw Neo4jException::fromBoltResponse ($ response );
407412 }
408413 }
You can’t perform that action at this time.
0 commit comments