From bd82bd6ef1bce5805d951cc351ba2a36a4d02e1d Mon Sep 17 00:00:00 2001 From: Carson Reinke Date: Mon, 4 Nov 2019 12:00:33 -0500 Subject: [PATCH] Fixes #223 --- src/Bigcommerce/Api/Connection.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Bigcommerce/Api/Connection.php b/src/Bigcommerce/Api/Connection.php index 1e5f7fd1..d9cbd228 100644 --- a/src/Bigcommerce/Api/Connection.php +++ b/src/Bigcommerce/Api/Connection.php @@ -286,14 +286,14 @@ private function handleResponse() if ($status >= 400 && $status <= 499) { if ($this->failOnError) { - throw new ClientError($body, $status); + throw new ClientError(strval($body), $status); } else { $this->lastError = $body; return false; } } elseif ($status >= 500 && $status <= 599) { if ($this->failOnError) { - throw new ServerError($body, $status); + throw new ServerError(strval($body), $status); } else { $this->lastError = $body; return false;