mirror of
https://github.com/AndrioCelos/TableturfBattleApp.git
synced 2026-07-07 12:34:14 -05:00
17 lines
536 B
C#
17 lines
536 B
C#
using System.Net;
|
|
using Newtonsoft.Json;
|
|
|
|
namespace TableturfBattleServer;
|
|
public readonly struct Error {
|
|
[JsonIgnore]
|
|
public HttpStatusCode HttpStatusCode { get; }
|
|
public string Code { get; }
|
|
public string Description { get; }
|
|
|
|
public Error(HttpStatusCode httpStatusCode, string code, string description) {
|
|
this.HttpStatusCode = httpStatusCode;
|
|
this.Code = code ?? throw new ArgumentNullException(nameof(code));
|
|
this.Description = description ?? throw new ArgumentNullException(nameof(description));
|
|
}
|
|
}
|