Server: added missing error message

This commit is contained in:
Vladimir Razuvaev 2017-08-16 19:22:45 +07:00
parent f369d4e2d4
commit 1ee226465b

View File

@ -4,6 +4,7 @@ namespace GraphQL\Server;
use GraphQL\Error\InvariantViolation;
use GraphQL\Executor\ExecutionResult;
use GraphQL\Executor\Promise\Promise;
use GraphQL\Utils;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Message\StreamInterface;
@ -49,7 +50,7 @@ class StandardServer
$config = ServerConfig::create($config);
}
if (!$config instanceof ServerConfig) {
throw new InvariantViolation("");
throw new InvariantViolation("Expecting valid server config, but got " . Utils::printSafe($config));
}
$this->config = $config;