Skip to content

Commit

Permalink
Merge pull request #5 from HakimBe/disabling_guzzle_http_errors
Browse files Browse the repository at this point in the history
disabling guzzle http errors
  • Loading branch information
gpanos authored May 23, 2022
2 parents c18ee98 + d1aba03 commit 4677f96
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
6 changes: 5 additions & 1 deletion src/Engines/AutocompleteEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());

Expand Down
6 changes: 5 additions & 1 deletion src/Engines/DetailsEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());

Expand Down
6 changes: 5 additions & 1 deletion src/Engines/GeocodeEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());

Expand Down

0 comments on commit 4677f96

Please sign in to comment.