diff --git a/src/NTAKClient.php b/src/NTAKClient.php index 02c1120..534357d 100644 --- a/src/NTAKClient.php +++ b/src/NTAKClient.php @@ -99,14 +99,13 @@ public function message(array $message, Carbon $when, string $uri): array ); $this->lastRequestTime = Carbon::now()->diffInMilliseconds($start); - - } catch (ClientException $e) { + } catch (RequestException $e) { throw new NTAKClientException( $e->getMessage() ); - } catch (RequestException $e) { + } catch (ClientException $e) { throw new NTAKClientException( - $e->getMessage() + $e->getResponse()->getBody()->getContents() ); }