Files
adas-core/adas-core.Domain/Exceptions/UserNotFoundException.cs
2026-06-26 10:29:23 +02:00

22 lines
678 B
C#

using System.Net;
namespace adas_core.Domain.Exceptions;
/// <summary>
/// Represents a business exception that is thrown when a requested user cannot be found.
/// </summary>
/// <remarks>
/// Inherits from <see cref="BusinessException"/> to signal user lookup failures within the business domain.
/// </remarks>
public class UserNotFoundException : BusinessException
{
public UserNotFoundException(string username) :
base(HttpStatusCode.NotFound, $"USER with username {username} not found")
{
}
public UserNotFoundException(string username, Exception exception) : base(
$"USER with username {username} not found", exception)
{
}
}