mirror of
https://github.com/LukeHagar/plexcsharp.git
synced 2025-12-06 12:37:46 +00:00
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.615.2
This commit is contained in:
@@ -6,36 +6,22 @@
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#nullable enable
|
||||
namespace LukeHagar.PlexAPI.SDK.Models.Errors
|
||||
{
|
||||
using System;
|
||||
using System.Net.Http;
|
||||
|
||||
public class SDKException : Exception
|
||||
public class SDKException : PlexAPIError
|
||||
{
|
||||
|
||||
public override string Message { get; }
|
||||
public int StatusCode { get; set; }
|
||||
public string Body { get; set; }
|
||||
public HttpResponseMessage RawResponse { get; set; } = default!;
|
||||
public SDKException(string message, int statusCode, string body, HttpResponseMessage rawResponse)
|
||||
{
|
||||
Message = message;
|
||||
this.StatusCode = statusCode;
|
||||
StatusCode = statusCode;
|
||||
Body = body;
|
||||
RawResponse = rawResponse;
|
||||
}
|
||||
|
||||
public override string ToString(){
|
||||
var body = "";
|
||||
if (Body.Length > 0)
|
||||
{
|
||||
body += $"\n{Body}";
|
||||
}
|
||||
return Message + ": Status " + StatusCode + body;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Default API exception.
|
||||
/// </summary>
|
||||
public SDKException(
|
||||
string message,
|
||||
HttpResponseMessage rawResponse,
|
||||
string body
|
||||
): base(message, rawResponse, body) {}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user