Skip to content

Commit 0c87c61

Browse files
committed
fix: error truncation
1 parent ccb762c commit 0c87c61

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Traits/Cluster/MakesHttpCalls.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,11 @@ public function call(string $method, string $path, string $payload = '', array $
8484
RequestOptions::BODY => $payload,
8585
]);
8686
} catch (ClientException $e) {
87-
$errorPayload = json_decode((string) $e->getResponse()->getBody(), true);
87+
$responseBody = (string) $e->getResponse()->getBody();
88+
$errorPayload = json_decode($responseBody, true);
8889

8990
throw new KubernetesAPIException(
90-
$e->getMessage(),
91+
$responseBody,
9192
$errorPayload['code'] ?? 0,
9293
$errorPayload
9394
);

0 commit comments

Comments
 (0)