Skip to content

Commit

Permalink
Update AmoCRMApiRequest.php
Browse files Browse the repository at this point in the history
  • Loading branch information
makeroi authored Jul 10, 2023
1 parent d68301f commit 6eefa28
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/AmoCRM/Client/AmoCRMApiRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,9 @@ private function parseResponse(ResponseInterface $response): array
&& !$decodedBody
&& !empty($bodyContents)
) {
if($e->getCode() == 429) {
throw new AmoCRMApiTooManyRequestsException("Too many requests", $e->getCode(), $this->getLastRequestInfo());
}
throw new AmoCRMApiException(
"Response body is not json",
$response->getStatusCode(),
Expand Down

0 comments on commit 6eefa28

Please sign in to comment.