Skip to content

Commit

Permalink
Don't eat GuzzleExceptions when requests fail
Browse files Browse the repository at this point in the history
Eating the exception prevents errors from surfacing in logs.
Additionally the (now removed) implementation of guzzle_exception
did not fully implement a PSR-7 response.
  • Loading branch information
cameron1729 committed Oct 27, 2023
1 parent 1bb0b96 commit ee5dbd6
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 64 deletions.
3 changes: 0 additions & 3 deletions classes/esrequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,6 @@ private function http_action($psr7request) {
$response = $this->client->send($psr7request);
} catch (\GuzzleHttp\Exception\BadResponseException $e) {
$response = $e->getResponse();
} catch (\GuzzleHttp\Exception\GuzzleException $e) {
// This case does not provide a response object with a consistent interface so we need to make one.
$response = new \search_elastic\guzzle_exception();
}

return $response;
Expand Down
61 changes: 0 additions & 61 deletions classes/guzzle_exception.php

This file was deleted.

0 comments on commit ee5dbd6

Please sign in to comment.