23 lines
720 B
C#
23 lines
720 B
C#
// <copyright file="UnauthorizedException.cs" company="alveus.dev">
|
|
// Copyright (c) alveus.dev. All rights reserved. Licensed under the MIT License.
|
|
// </copyright>
|
|
|
|
using System.Net;
|
|
using Astral.Core.Constants;
|
|
using Astral.Core.Exceptions;
|
|
|
|
namespace Astral.Services.Exceptions;
|
|
|
|
/// <summary>
|
|
/// Thrown when an attempt to perform an unauthorised action occurs.
|
|
/// </summary>
|
|
public class UnauthorizedException : ServiceException
|
|
{
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="UnauthorizedException" /> class.
|
|
/// </summary>
|
|
public UnauthorizedException()
|
|
: base(CoreErrorCodes.Unauthorized, "You are not authorized to do that", HttpStatusCode.Unauthorized)
|
|
{
|
|
}
|
|
}
|