astral-api/Astral.Services/Exceptions/UserBannedException.cs

24 lines
695 B
C#
Raw Permalink Normal View History

2024-12-11 21:36:30 +01:00
// <copyright file="UserBannedException.cs" company="alveus.dev">
// Copyright (c) alveus.dev. All rights reserved. Licensed under the MIT License.
// </copyright>
using System.Net;
using Astral.Core.Exceptions;
using Astral.Services.Constants;
namespace Astral.Services.Exceptions;
/// <summary>
/// Thrown when the logging in user is suspended.
/// </summary>
public class UserBannedException : ServiceException
{
/// <summary>
/// Initializes a new instance of the <see cref="UserBannedException" /> class.
/// </summary>
public UserBannedException()
: base(ServiceErrorCodes.BannedUser, "You are banned from logging in", HttpStatusCode.Unauthorized)
{
}
}