From 33f3aaf37f4d35f61b3cbfc3cdeff61d280e02f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?= Date: Wed, 12 Aug 2026 17:30:36 +0200 Subject: [PATCH] fix(api): correct condition for JSON request handling Ensure proper handling of requests that expect JSON responses. --- src/Presentation/Api/Exceptions/ApiExceptionDispatcher.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Presentation/Api/Exceptions/ApiExceptionDispatcher.php b/src/Presentation/Api/Exceptions/ApiExceptionDispatcher.php index 0863c10..e2460ee 100644 --- a/src/Presentation/Api/Exceptions/ApiExceptionDispatcher.php +++ b/src/Presentation/Api/Exceptions/ApiExceptionDispatcher.php @@ -18,7 +18,7 @@ final readonly class ApiExceptionDispatcher public function render(Throwable $e, Request $request): ?JsonResponse { - if (! $request->is('api/*') && ! $request->wantsJson()) { + if (! $request->is('api/*', 'api') && ! $request->wantsJson()) { return null; }