getMessage(), $e->getCode(), $e); } public static function fromClientException(ClientException $e): self { $response = $e->getResponse(); return new static(json_decode($response->getBody())->error, $response->getStatusCode()); } }