Skip to content

Commit

Permalink
Merge pull request #16 from hepisec/master
Browse files Browse the repository at this point in the history
Fixed bug in exception handler
  • Loading branch information
repat authored May 31, 2021
2 parents 0401950 + a00d3d1 commit aef53cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PlentymarketsRestClient/PlentymarketsRestClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public function singleCall($method, $path, $params = [])
} catch (\Exception $e) {

// For a better Plentymarkets exception handling. Sometimes the limit is not correct
if (s($e->getMessage())->contains(self::ERROR_SHORT_PERIOD_READ_LIMIT)) {
if (new (s($e->getMessage()))->contains(self::ERROR_SHORT_PERIOD_READ_LIMIT)) {
sleep(self::WAIT_ERROR_SHORT_PERIOD_READ_LIMIT);
$this->singleCall($method, $path, $params);
// TODO possible handle recursion errors
Expand Down

0 comments on commit aef53cd

Please sign in to comment.