diff --git a/src/Bolt/BoltConnection.php b/src/Bolt/BoltConnection.php index 3b68a525..cca82f68 100644 --- a/src/Bolt/BoltConnection.php +++ b/src/Bolt/BoltConnection.php @@ -368,7 +368,11 @@ public function getUserAgent(): string private function assertNoFailure(Response $response): void { if ($response->signature === Signature::FAILURE) { - $this->protocol()->reset()->getResponse(); // what if the reset fails? what should be expected behaviour? + $resetResponse = $this->protocol()->reset()->getResponse(); + $this->subscribedResults = []; + if ($resetResponse->signature === Signature::FAILURE) { + throw new Neo4jException([Neo4jError::fromBoltResponse($resetResponse), Neo4jError::fromBoltResponse($response)]); + } throw Neo4jException::fromBoltResponse($response); } }