Skip to content

Commit 129df24

Browse files
author
Mikk Mihkel Nurges
committed
Merge branch 'release/v1.17.1'
2 parents 81cbeaf + 3339eb4 commit 129df24

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Rebing/GraphQL/GraphQL.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public function queryAndReturnResult($query, $params = [], $opts = [])
9999
$schema = $this->schema($schemaName);
100100

101101
$errorFormatter = config('graphql.error_formatter', [static::class, 'formatError']);
102-
$errorsHandler = config('grahpql.errors_handler', [static::class, 'handleErrors']);
102+
$errorsHandler = config('graphql.errors_handler', [static::class, 'handleErrors']);
103103

104104
$result = GraphQLBase::executeQuery($schema, $query, null, $context, $params, $operationName)
105105
->setErrorsHandler($errorsHandler)
@@ -295,7 +295,7 @@ public static function handleErrors(array $errors, callable $formatter)
295295
foreach ($errors as $error) {
296296
// Try to unwrap exception
297297
$error = $error->getPrevious() ?: $error;
298-
if ($error instanceof \GraphQL\Error\Error) {
298+
if (!($error instanceof \Exception)) {
299299
continue;
300300
}
301301
$handler->report($error);

0 commit comments

Comments
 (0)