Skip to content

Commit c0239d2

Browse files
authored
fix: logggedPool exception handler
1 parent db6feb2 commit c0239d2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Logger/LoggerPool.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use Illuminate\Support\Traits\ForwardsCalls;
1010
use ReflectionClass;
1111
use Saloon\Exceptions\Request\RequestException;
12+
use Saloon\Exceptions\Request\FatalRequestException;
1213
use Saloon\Http\Connector;
1314
use Saloon\Http\Pool;
1415

@@ -65,7 +66,7 @@ function (\Saloon\Http\Response $response, mixed $requestId, PromiseInterface $p
6566
$exceptionHandler = $this->getProtectedValueFromPool('exceptionHandler');
6667

6768
$this->pool->withExceptionHandler(
68-
function (RequestException $exception, mixed $requestId, PromiseInterface $promise) use ($connector, $exceptionHandler) {
69+
function (FatalRequestException|RequestException $exception, mixed $requestId, PromiseInterface $promise) use ($connector, $exceptionHandler) {
6970
// If the pending request has log data attached
7071
if ($logData = $exception->getPendingRequest()->config()->get(RegisterLoggerMiddleware::LOGGER_DATA)) {
7172
// Log the request

0 commit comments

Comments
 (0)