From 5b2672c4944c07f7b4139e8b1db31a52160963c4 Mon Sep 17 00:00:00 2001 From: ab95david Date: Mon, 2 Dec 2019 13:25:00 +0100 Subject: [PATCH] Remove obfuscation in request method when an exception occurs --- lib/Signaturit/Client.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/lib/Signaturit/Client.php b/lib/Signaturit/Client.php index 8244461..e6d553e 100644 --- a/lib/Signaturit/Client.php +++ b/lib/Signaturit/Client.php @@ -841,19 +841,16 @@ protected function extractFormParameters($files, $recipients, $params) * @param $path * @param array $params * @param bool $json + * @throws \Exception * * @return \Psr\Http\Message\ResponseInterface */ protected function request($method, $path, $params = [], $json = true) { - try { - $response = $this->client->$method("$this->url/$path", $params)->getBody(); + $response = $this->client->$method("$this->url/$path", $params)->getBody(); - if ($json) { - $response = json_decode($response, true); - } - } catch (\Exception $exception) { - $response = $exception->getMessage(); + if ($json) { + $response = json_decode($response, true); } return $response;