diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d930c0..db40969 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [v2.1.1] - 2021-09-29 + +### Fixed + +- Fix exception message retrieving from error collection + ## [v2.1.0] - 2021-07-02 ### Changed diff --git a/src/EntityManager.php b/src/EntityManager.php index 5e0e515..c938160 100644 --- a/src/EntityManager.php +++ b/src/EntityManager.php @@ -85,6 +85,7 @@ public function __construct( $this->serializer = $serializer; $this->resolver = $resolver; $this->requestPool = $requestPool ?: new Pool($client); + $this->errors = new Errors(); } /** @@ -312,7 +313,7 @@ public function sendRequestPool(int $concurrencyLimit = 5) } } catch (PoolException $e) { - $this->errors = $this->requestPool->getErrors(); + $this->errors = clone $this->requestPool->getErrors(); throw new EntityManagerException("Request failed!\nReason:\n".$this->errors->getFullMessage()); } finally {