From 1ee226465bbb950648da174185338b368cecc032 Mon Sep 17 00:00:00 2001 From: Vladimir Razuvaev Date: Wed, 16 Aug 2017 19:22:45 +0700 Subject: [PATCH] Server: added missing error message --- src/Server/StandardServer.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Server/StandardServer.php b/src/Server/StandardServer.php index e5733f6..3b5b184 100644 --- a/src/Server/StandardServer.php +++ b/src/Server/StandardServer.php @@ -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;