using SIGCM2.Domain.Exceptions;

namespace SIGCM2.Domain.Pricing.Exceptions;

/// <summary>
/// PRC-001 — Thrown when WordCounterService input fails validation
/// (e.g., exceeds maximum length of 2000 chars). → HTTP 400
/// Used as defense-in-depth alongside FluentValidation in the Application layer.
/// </summary>
public sealed class WordCountValidationException : DomainException
{
    public string Field { get; }
    public string Reason { get; }

    public WordCountValidationException(string field, string reason)
        : base($"Valor inválido para {field}: {reason}")
    {
        Field = field;
        Reason = reason;
    }
}
