20 lines
556 B
C#
20 lines
556 B
C#
using System.Net;
|
|
using Galaeth.Core.Constants;
|
|
using Galaeth.Core.Exceptions;
|
|
|
|
namespace Galaeth.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)
|
|
{
|
|
}
|
|
}
|