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

24 lines
712 B
C#
Raw Permalink Normal View History

2024-12-14 17:31:17 +01:00
// <copyright file="UserSuspendedException.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 UserSuspendedException : ServiceException
{
/// <summary>
/// Initializes a new instance of the <see cref="UserSuspendedException"/> class.
/// </summary>
public UserSuspendedException()
: base(ServiceErrorCodes.SuspendedUser, "You are suspended from logging in", HttpStatusCode.Unauthorized)
{
}
}