From d1aba03f6e19a422efa3be725e542708eae399c1 Mon Sep 17 00:00:00 2001 From: Hakim Benmazouz Date: Mon, 23 May 2022 11:12:32 +0200 Subject: [PATCH] disabling guzzle http errors --- src/Engines/AutocompleteEngine.php | 6 +++++- src/Engines/DetailsEngine.php | 6 +++++- src/Engines/GeocodeEngine.php | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/Engines/AutocompleteEngine.php b/src/Engines/AutocompleteEngine.php index 6d5f109..402fe1a 100644 --- a/src/Engines/AutocompleteEngine.php +++ b/src/Engines/AutocompleteEngine.php @@ -24,7 +24,11 @@ public function search(Builder $builder): mixed return []; } - $response = $this->client->request('GET', $this->endpoint, $payload); + $response = $this->client->request( + 'GET', + $this->endpoint, + array_merge(['http_errors' => false], $payload) + ); $response = json_decode($response->getBody()); diff --git a/src/Engines/DetailsEngine.php b/src/Engines/DetailsEngine.php index 27227b5..309a8f3 100644 --- a/src/Engines/DetailsEngine.php +++ b/src/Engines/DetailsEngine.php @@ -20,7 +20,11 @@ public function search(Builder $builder): mixed { $payload = $this->getRequestPayload($builder); - $response = $this->client->request('GET', $this->endpoint, $payload); + $response = $this->client->request( + 'GET', + $this->endpoint, + array_merge(['http_errors' => false], $payload) + ); $response = json_decode($response->getBody()); diff --git a/src/Engines/GeocodeEngine.php b/src/Engines/GeocodeEngine.php index a50db4e..2882610 100644 --- a/src/Engines/GeocodeEngine.php +++ b/src/Engines/GeocodeEngine.php @@ -24,7 +24,11 @@ public function search(Builder $builder): mixed return []; } - $response = $this->client->request('GET', $this->endpoint, $payload); + $response = $this->client->request( + 'GET', + $this->endpoint, + array_merge(['http_errors' => false], $payload) + ); $response = json_decode($response->getBody());