File tree 1 file changed +6
-1
lines changed
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 30
30
use Laudis \Neo4j \Contracts \FormatterInterface ;
31
31
use Laudis \Neo4j \Databags \BookmarkHolder ;
32
32
use Laudis \Neo4j \Databags \DatabaseInfo ;
33
+ use Laudis \Neo4j \Databags \Neo4jError ;
33
34
use Laudis \Neo4j \Enum \AccessMode ;
34
35
use Laudis \Neo4j \Enum \ConnectionProtocol ;
35
36
use Laudis \Neo4j \Exception \Neo4jException ;
@@ -402,7 +403,11 @@ private function assertNoFailure(Response $response): void
402
403
{
403
404
if ($ response ->signature === Signature::FAILURE ) {
404
405
$ 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
+ }
406
411
throw Neo4jException::fromBoltResponse ($ response );
407
412
}
408
413
}
You can’t perform that action at this time.
0 commit comments