using System;
namespace OrderSupportTicket.Services;
///
/// 工单接口调用失败时返回的异常。
///
public sealed class TicketApiException : Exception
{
///
/// 创建工单接口异常。
///
public TicketApiException(
int statusCode,
string message,
string responseBody = null)
: base(message)
{
StatusCode = statusCode;
ResponseBody = responseBody;
}
///
/// 服务端返回的状态码;无法从 GetHtml 响应中识别时为 0。
///
public int StatusCode { get; }
///
/// 服务端返回的原始响应正文。
///
public string ResponseBody { get; }
}