fix: ensure JSON exceptions are rendered when the request expects a JSON response
This commit is contained in:
parent
39c8bd01a8
commit
876b81d8f6
@ -35,7 +35,7 @@
|
|||||||
})
|
})
|
||||||
->withExceptions(function (Exceptions $exceptions): void {
|
->withExceptions(function (Exceptions $exceptions): void {
|
||||||
$exceptions->shouldRenderJsonWhen(
|
$exceptions->shouldRenderJsonWhen(
|
||||||
fn (Request $request) => $request->is('api/*'),
|
fn (Request $request) => $request->is('api/*') || $request->expectsJson(),
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
->withSchedule(function (Schedule $schedule): void {
|
->withSchedule(function (Schedule $schedule): void {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user