//
// Copyright (c) alveus.dev. All rights reserved. Licensed under the MIT License.
//
using System.Net;
using Astral.Core.Exceptions;
using Astral.Services.Constants;
namespace Astral.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)
{
}
}