namespace ProposalSystem.Application.Common; /// /// Business-rule violation carrying a machine-readable code, surfaced as /// 422 ProblemDetails with a top-level "code" extension (SHOC error-code /// vocabulary convention — e.g. "CancelNotAllowed"). Clients branch on the /// code, never on the human-readable message. /// public class BusinessRuleException : Exception { public string Code { get; } public BusinessRuleException(string code, string message) : base(message) { Code = code; } }