mirror of
https://github.com/retailcrm/graphql-php.git
synced 2024-11-22 21:06:05 +03:00
Do not output trace for trivial errors even in debug mode
This commit is contained in:
parent
3e6f2c9e83
commit
e7838d2253
@ -91,9 +91,13 @@ class FormattedError
|
||||
}
|
||||
|
||||
if ($debug & self::INCLUDE_TRACE > 0) {
|
||||
$isTrivial = $e instanceof Error && !$e->getPrevious();
|
||||
|
||||
if (!$isTrivial) {
|
||||
$debugging = $e->getPrevious() ?: $e;
|
||||
$result['trace'] = static::toSafeTrace($debugging->getTrace());
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user