render(function (HttpException $e, Request $request) { $status = $e->getStatusCode(); return InertiaHelper::errorRender($request, $status); }); $exceptions->report(function (\Throwable $e) { if (app()->bound('sentry')) { app('sentry')->captureException($e); } }); $exceptions->render(function (ValidationException $e, Request $request) { $safeInput = Collection::make($request->all()) ->except(['password', 'password_confirmation', 'current_password']) ->toArray(); return back() ->withInput($safeInput) ->withErrors($e->errors()); }); };