Adds Result and Error primitives to the web project

This commit is contained in:
BinaryAlley committed 2026-08-19 10:22:29 -07:00
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 required resource is currently unavailable.
/// </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 ResourceUnavailableError(string Code, string Description) : Error
{
/// <summary>
/// Gets the type of this error.
/// </summary>
public override ErrorType Type => ErrorType.Unexpected;
/// <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;
}