Skip to content

Commit

Permalink
Merge pull request #9 from signnow/snapi-9524-fix-storing-of-errors-f…
Browse files Browse the repository at this point in the history
…rom-1x

[SNAPI-9524] Fixed storing of errors
  • Loading branch information
falgonua authored Sep 29, 2021
2 parents 4353bb1 + 4b5a3b2 commit 0ca41ce
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

## [v1.4.1] - 2021-09-29

### Fixed

- Fix exception message retrieving from error collection

## [v1.4.0] - 2021-08-17

### Changed
Expand Down
3 changes: 2 additions & 1 deletion src/EntityManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ public function __construct(
$this->serializer = $serializer;
$this->resolver = $resolver;
$this->requestPool = $requestPool ?: new Pool($client);
$this->errors = new Errors();
}

/**
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 0ca41ce

Please sign in to comment.