mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 06:11:10 +00:00
Adds Result and Error primitives to the web project
This commit is contained in:
1 parent
215325a027
commit
587daaabb7
20 files changed
+850
No files matched your search
@@ -0,0 +1,28 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Presentation.Web.Common.Enums.Primitives;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Presentation.Web.Common.Primitives;
|
||||
|
||||
/// <summary>
|
||||
/// Error representing that the operation is not allowed due to insufficient permissions or restrictions.
|
||||
/// </summary>
|
||||
/// <param name="Code">The error code that uniquely identifies this error type.</param>
|
||||
/// <param name="Description">The human-readable description of the error.</param>
|
||||
public record ForbiddenError(string Code, string Description) : Error
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the type of this error.
|
||||
/// </summary>
|
||||
public override ErrorType Type => ErrorType.Forbidden;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the error code that uniquely identifies this error type.
|
||||
/// </summary>
|
||||
public override string Code { get; } = Code;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the human-readable description of the error.
|
||||
/// </summary>
|
||||
public override string Description { get; } = Description;
|
||||
}
|
||||
Reference in new issue
Block a user