Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
danepowell committed Apr 16, 2024
1 parent 27683b2 commit 94f5eb7
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 65 deletions.
123 changes: 59 additions & 64 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/Connector/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

namespace AcquiaCloudApi\Connector;

use http\Exception\RuntimeException;
use Psr\Http\Message\ResponseInterface;
use GuzzleHttp\Exception\BadResponseException;
use AcquiaCloudApi\Exception\ApiErrorException;
use Psr\Http\Message\StreamInterface;
use RuntimeException;

/**
* Class Client
Expand Down Expand Up @@ -162,6 +162,7 @@ public function processResponse(ResponseInterface $response): mixed
}
$body_json = $response->getBody();
$body = json_decode($body_json, null, 512, JSON_THROW_ON_ERROR);
// Internal server errors may also return a 200 response and empty body.
if (is_null($body)) {
throw new RuntimeException(
'Response contained an empty body. Status '
Expand Down

0 comments on commit 94f5eb7

Please sign in to comment.