shoc-backend/SeaHaven.Services/Exceptions/SiteExceptions.cs

25 lines
732 B
C#
Raw Normal View History

namespace SeaHaven.Services.Exceptions;
/// <summary>Another live site of the same client already uses the requested site code.</summary>
public sealed class SiteCodeConflictException : Exception
{
public const string ErrorCode = "DuplicateSiteCode";
public const string PublicMessage = "This site code already exists.";
public SiteCodeConflictException()
: base(PublicMessage)
{
}
}
/// <summary>The caller lacks the permission required for a site mutation.</summary>
public sealed class SiteForbiddenException : Exception
{
public const string DeleteDeniedMessage = "You are not allowed to delete sites.";
public SiteForbiddenException(string message)
: base(message)
{
}
}