code: function createCombinedError(
    errors: $ReadOnlyArray<UserError>,
    maybePrefix?: ?string,
  ): CombinedUserError {
    const prefix = maybePrefix != null ? `${maybePrefix}: ` : '';
    return new Error(
      `${prefix}Encountered ${errors.length} error(s):\n` +
        errors
          .map(error =>
            String(error)
              .split('\n')
              .map((line, index) => (index === 0 ? `- ${line}` : `  ${line}`))
              .join('\n'),
          )
          .join('\n'),
    );
  }
docs: Merges the results of multiple user errors into one so that they
  can be reported in bulk.