namespace Common.Responses;

/// <summary>
/// Standard error body returned by all API endpoints on 4xx and 5xx responses.
/// </summary>
public sealed class ErrorResponse
{
    /// <summary>Human-readable error message, safe to display directly to the end user for 4xx responses.</summary>
    public string Error { get; init; } = string.Empty;

    /// <summary>Machine-readable error code for programmatic handling (e.g. <c>"captcha_verification_failed"</c>).</summary>
    public string? Code { get; init; }

    /// <summary>Optional additional detail for debugging (not shown in UI).</summary>
    public string? Detail { get; init; }
}
