route->getHandler())($call); if ($result instanceof ResponseInterface) { return $result; } throw new InvalidResponseException(); } public function notFound(RequestInterface $request): ResponseInterface { throw new NotFoundException(); } }