mirror of
https://github.com/MAKS-IT-COM/maksit-certs-ui.git
synced 2025-12-31 04:00:03 +01:00
34 lines
713 B
C#
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; }
|
|
}
|
|
}
|