code: function completeValueWithLocatedError(
    exeContext: ExecutionContext,
    returnType: GraphQLType,
    fieldNodes: Array<FieldNode>,
    info: GraphQLResolveInfo,
    path: ResponsePath,
    result: mixed,
    parentDirectiveTree: DirectiveTree,
    execDetails: ObjMap<mixed>
  ): mixed {
    try {
      const completed = completeValue(
        exeContext,
        returnType,
        fieldNodes,
        info,
        path,
        result,
        parentDirectiveTree,
        execDetails
      );
      const promise = getPromise(completed);
      if (promise) {
        return promise.then(
          undefined,
          error => Promise.reject(
            locatedError(error, fieldNodes, responsePathAsArray(path))
          )
        );
      }
      return completed;
    } catch (error) {
      throw locatedError(error, fieldNodes, responsePathAsArray(path));
    }
  }
docs: This is a small wrapper around completeValue which annotates errors with location information.