namespace SIGCM2.Domain.Exceptions;

/// <summary>
/// UDT-009: Thrown when the same code appears in both grant and deny arrays.
/// Maps to 400 { title: "grant-deny-overlap", overlap: [...] }.
/// </summary>
public sealed class GrantDenyOverlapException : Exception
{
    public IReadOnlyList<string> Overlap { get; }

    public GrantDenyOverlapException(IReadOnlyList<string> overlap)
        : base($"Los siguientes códigos aparecen en grant y deny simultáneamente: {string.Join(", ", overlap)}")
    {
        Overlap = overlap;
    }
}
