public function completeValueCatchingError(
        TypeInterface $returnType,
        array $fieldNodes,
        ResolveInfo $info,
        array $path,
        &$result
    ) {
        try {
            $completed = $result instanceof PromiseInterface
                ? $result->then(function ($resolvedResult) use ($returnType, $fieldNodes, $info, $path) {
                    return $this->completeValue($returnType, $fieldNodes, $info, $path, $resolvedResult);
                })
                : $this->completeValue($returnType, $fieldNodes, $info, $path, $result);

            if ($completed instanceof PromiseInterface) {
                // Note: we don't rely on a `catch` method, but we do expect "thenable"
                // to take a second callback for the error case.
                return $completed->then(null, function ($exception) use ($fieldNodes, $path, $returnType) {
                    $this->handleFieldError($exception, $fieldNodes, $path, $returnType);
                });
            }

            return $completed;
        } catch (\Throwable $exception) {
            $this->handleFieldError($exception, $fieldNodes, $path, $returnType);
            return null;
        }
    }