using System.Net;
namespace adas_core.Domain.Exceptions;
///
/// Represents an exception that is thrown when an error occurs within the login services layer.
///
///
/// This exception extends to signal business-level failures
/// specific to authentication and login operations.
///
public class LoginServicesException : BusinessException
{
///
/// Initializes a new instance of the class with a descriptive error message, forwarding it to the base exception together with an HTTP status code.
///
/// The error message that describes the login service failure.
///
public LoginServicesException(string message) :
base(HttpStatusCode.BadRequest, $"Login service error: {message}")
{
}
///
/// Initializes a new instance of the class, which represents errors that occur in the login service. The supplied is prefixed with a service-context note and the underlying is preserved as the inner exception.
///
/// The error message describing the login service failure.
/// The inner that caused the current exception.
///
public LoginServicesException(string message, Exception exception) : base($"Login service error: {message}",
exception)
{
}
}