onHandler($request, $passable); } catch (\Throwable $throwable) { logger()->addError($throwable, 'throwable'); return Json::to(0, $throwable); } }; }); } /** * @return Closure */ private static function core(): Closure { return function ($stack, $pipe) { return function ($passable) use ($stack, $pipe) { return call_user_func($pipe, $passable, $stack); }; }; } }