Skip to content

Commit f3a9851

Browse files
author
Mikk Mihkel Nurges
committed
Fixed default error handler to report only \Exception
1 parent 2018727 commit f3a9851

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Rebing/GraphQL/GraphQL.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -296,10 +296,9 @@ public static function handleErrors(array $errors, callable $formatter)
296296
foreach ($errors as $error) {
297297
// Try to unwrap exception
298298
$error = $error->getPrevious() ?: $error;
299-
if ($error instanceof \GraphQL\Error\Error) {
300-
continue;
299+
if ($error instanceof \Exception) {
300+
$handler->report($error);
301301
}
302-
$handler->report($error);
303302
}
304303
return array_map($formatter, $errors);
305304
}

0 commit comments

Comments
 (0)