using System.Net;
using Galaeth.Core.Exceptions;
using Galaeth.Services.Constants;
namespace Galaeth.Services.Exceptions;
///
/// Thrown when there is an attempt to create a user with an already taken username.
///
public class UsernameTakenException : ServiceException
{
///
/// Initializes a new instance of the class.
///
/// The username attempted.
public UsernameTakenException(string username)
: base(ServiceErrorCodes.UsernameTaken, $"Username {username} has already been taken", HttpStatusCode.Conflict)
{
}
}