diff --git a/src/Driver/Browserless.php b/src/Driver/Browserless.php index b2a87a1..b1373a0 100644 --- a/src/Driver/Browserless.php +++ b/src/Driver/Browserless.php @@ -2,7 +2,7 @@ namespace HelpPC\ChromePdf\Driver; -use HelpPC\ChromePdf\Exception\APIException; +use HelpPC\ChromePdf\Exception\ApiException; use Symfony\Component\HttpClient\Exception\ClientException; use Symfony\Contracts\HttpClient; @@ -214,7 +214,7 @@ private function render(array $options): string $response = $this->client->request('POST', $this->apiUrl . $this->pdfEndpoint, $requestOptions); return $response->getContent(); } catch (ClientException $e) { - throw new APIException("Failed to render PDF: {$e->getMessage()}", $e->getCode(), $e); + throw new ApiException("Failed to render PDF: {$e->getMessage()}", $e->getCode(), $e); } } diff --git a/src/Exception/ApiException.php b/src/Exception/ApiException.php index 7df5157..78153e9 100644 --- a/src/Exception/ApiException.php +++ b/src/Exception/ApiException.php @@ -2,6 +2,6 @@ namespace HelpPC\ChromePdf\Exception; -class APIException extends \RuntimeException +class ApiException extends \RuntimeException { } \ No newline at end of file