DiscordApi/Discord.API/Rest/RestFailResponse.cs
2024-07-20 20:56:59 +02:00

14 lines
458 B
C#

using System.Net;
using Discord.API.Rest;
namespace Discord.API;
public class RestFailResponse<T>(Exception? ex) : RestResponse<T>
{
public override T Value => throw new InvalidOperationException();
public override HttpStatusCode StatusCode => throw new InvalidOperationException();
public override bool Success => false;
public override RestError Error => throw new InvalidOperationException();
public Exception? Exception => ex;
}