GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — IDTExpress.NET/IdtExpressApiException.cs at main · Spire-Recovery-Solutions/IDTExpress.NET Expand file tree/ Copy pathIdtExpressApiException.csMore file actions 57 lines (52 loc) · 2.4 KB / Copy pathIdtExpressApiException.csFile metadata and controls57 lines (52 loc) · 2.4 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 using IDTExpress.NET.Models.Responses; using System.Net; namespace IDTExpress.NET { /// <summary> /// Represents an exception thrown by the IDT Express API. /// This exception includes details about the error response and HTTP status code. /// </summary> public class IdtExpressApiException : Exception { /// <summary> /// Gets the error response object containing detailed error information from the IDT Express API. /// </summary> public ErrorResponse ErrorResponse { get; } /// <summary> /// Gets the HTTP status code associated with the error response. /// </summary> public HttpStatusCode StatusCode { get; } /// <summary> /// Initializes a new instance of the <see cref="IdtExpressApiException"/> class with an error response and HTTP status code. /// </summary> /// <param name="errorResponse">The error response object from the IDT Express API.</param> /// <param name="statusCode">The HTTP status code associated with the error.</param> public IdtExpressApiException(ErrorResponse errorResponse, HttpStatusCode statusCode) : base(errorResponse?.Errors?[0]?.Detail ?? "An error occurred with the IDT Express API") { ErrorResponse = errorResponse; StatusCode = statusCode; } /// <summary> /// Initializes a new instance of the <see cref="IdtExpressApiException"/> class with a custom message. /// </summary> /// <param name="message">The custom error message.</param> public IdtExpressApiException(string message) : base(message) { } /// <summary> /// Initializes a new instance of the <see cref="IdtExpressApiException"/> class with a custom message, detailed error information, and HTTP status code. /// </summary> /// <param name="message">The custom error message.</param> /// <param name="detail">The detailed error description.</param> /// <param name="statusCode">The HTTP status code associated with the error.</param> public IdtExpressApiException(string message, string detail, HttpStatusCode statusCode) : base(message) { ErrorResponse = new ErrorResponse { Errors = new[] { new ErrorDetail { Detail = detail } } }; StatusCode = statusCode; } } } |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |