using adas_core.Domain.Enums; namespace adas_core.Application.Exceptions; /// /// Represents an exception that is thrown when an entity cannot be processed due to issues with its content or structure. /// /// /// This exception is typically used to signal that a request or entity was understood but could not be processed, similar to the semantics of an HTTP 422 (Unprocessable Entity) response. /// /// public class UnprocessableEntityException : Exception { /// /// Initializes a new instance of the class with a specified error message enum. /// /// The error message enum containing the error code. /// public UnprocessableEntityException(HttpEnum.ErrorMessage message) : base(((int)message).ToString()) { } /// /// Initializes a new instance of the class with a specified error message. /// /// The message that describes the error. /// public UnprocessableEntityException(string message) : base(message) { } }