Skip to content

Commit

Permalink
Merge pull request #10 from signnow/snapi-9524-fix-storing-of-errors-…
Browse files Browse the repository at this point in the history
…from-master

[SNAPI-9524] Fixed storing of errors
  • Loading branch information
falgonua authored Sep 29, 2021
2 parents eeaa8e4 + af21f7d commit c54a378
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).

## [v2.1.1] - 2021-09-29

### Fixed

- Fix exception message retrieving from error collection

## [v2.1.0] - 2021-07-02

### 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 c54a378

Please sign in to comment.