mirror of
https://github.com/retailcrm/graphql-php.git
synced 2024-11-22 12:56:05 +03:00
Server: added missing error message
This commit is contained in:
parent
f369d4e2d4
commit
1ee226465b
@ -4,6 +4,7 @@ namespace GraphQL\Server;
|
|||||||
use GraphQL\Error\InvariantViolation;
|
use GraphQL\Error\InvariantViolation;
|
||||||
use GraphQL\Executor\ExecutionResult;
|
use GraphQL\Executor\ExecutionResult;
|
||||||
use GraphQL\Executor\Promise\Promise;
|
use GraphQL\Executor\Promise\Promise;
|
||||||
|
use GraphQL\Utils;
|
||||||
use Psr\Http\Message\ResponseInterface;
|
use Psr\Http\Message\ResponseInterface;
|
||||||
use Psr\Http\Message\ServerRequestInterface;
|
use Psr\Http\Message\ServerRequestInterface;
|
||||||
use Psr\Http\Message\StreamInterface;
|
use Psr\Http\Message\StreamInterface;
|
||||||
@ -49,7 +50,7 @@ class StandardServer
|
|||||||
$config = ServerConfig::create($config);
|
$config = ServerConfig::create($config);
|
||||||
}
|
}
|
||||||
if (!$config instanceof ServerConfig) {
|
if (!$config instanceof ServerConfig) {
|
||||||
throw new InvariantViolation("");
|
throw new InvariantViolation("Expecting valid server config, but got " . Utils::printSafe($config));
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->config = $config;
|
$this->config = $config;
|
||||||
|
Loading…
Reference in New Issue
Block a user