maksit-certs-ui/v2.0/LetsEncrypt/Exceptions/LetsEncrytException.cs

34 lines
713 B
C#

using System;
using System.Net.Http;
using Newtonsoft.Json;
namespace LetsEncrypt.Exceptions
{
public class LetsEncrytException : Exception
{
public LetsEncrytException(Problem problem, HttpResponseMessage response)
: base($"{problem.Type}: {problem.Detail}")
{
Problem = problem;
Response = response;
}
public Problem Problem { get; }
public HttpResponseMessage Response { get; }
}
public class Problem
{
[JsonProperty("type")]
public string Type { get; set; }
[JsonProperty("detail")]
public string Detail { get; set; }
public string RawJson { get; set; }
}
}