reportable(function (Throwable $e) { }); $this->renderable(function (Throwable $e) { if($e instanceof NotFoundException){ return $e->response(); } elseif ($e instanceof ServerErrorException) { return $e->response(); } }); } }