public function send($controller, User $actor = null, array $queryParams = [], array $body = []): ResponseInterface
    {
        $request = ServerRequestFactory::fromGlobals(null, $queryParams, $body);

        $request = $request->withAttribute('actor', $actor);

        if (is_string($controller)) {
            $controller = $this->container->make($controller);
        }

        if (! ($controller instanceof RequestHandlerInterface)) {
            throw new InvalidArgumentException(
                'Endpoint must be an instance of '.RequestHandlerInterface::class
            );
        }

        try {
            return $controller->handle($request);
        } catch (Exception $e) {
            if (! $this->errorHandler) {
                throw $e;
            }

            return $this->errorHandler->handle($e);
        }
    }