Skip to content

Commit

Permalink
request exception catched too
Browse files Browse the repository at this point in the history
  • Loading branch information
Tamás KIRÁLY committed Jun 4, 2023
1 parent 31492f0 commit f402e51
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/NTAKClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Gamegos\JWS\JWS;
use GuzzleHttp\Client;
use GuzzleHttp\Exception\ClientException;
use GuzzleHttp\Exception\RequestException;
use Kiralyta\Ntak\Exceptions\NTAKClientException;

class NTAKClient
Expand Down Expand Up @@ -103,6 +104,10 @@ public function message(array $message, Carbon $when, string $uri): array
throw new NTAKClientException(
$e->getResponse()->getBody()->getContents()
);
} catch (RequestException $e) {
throw new NTAKClientException(
$e->getResponse()->getBody()->getContents()
);
}

return $this->lastResponse = is_array($response)
Expand Down

0 comments on commit f402e51

Please sign in to comment.