// Copyright (c) The Geekeey Authors
// SPDX-License-Identifier: EUPL-1.2
namespace Geekeey.Extensions.Result;
///
/// An error which is a combination of other errors.
///
/// The errors the error consists of.
public sealed class AggregateError(IEnumerable errors) : Error
{
///
/// The errors the error consists of.
///
public IReadOnlyCollection Errors { get; } = errors.ToList();
///
public override string Message => string.Join(Environment.NewLine, Errors.Select(error => error.Message));
}