// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. using System.Runtime.Serialization; namespace k8s.Autorest { /// /// Exception thrown for an invalid response with custom error information. /// [Serializable] public class HttpOperationException : Exception { /// /// Gets information about the associated HTTP request. /// public HttpRequestMessageWrapper Request { get; set; } /// /// Gets information about the associated HTTP response. /// public HttpResponseMessageWrapper Response { get; set; } /// /// Gets or sets the response object. /// public object Body { get; set; } /// /// Initializes a new instance of the class. /// public HttpOperationException() { } /// /// Initializes a new instance of the class. /// /// The exception message. public HttpOperationException(string message) : this(message, null) { } /// /// Initializes a new instance of the class. /// /// The exception message. /// Inner exception. public HttpOperationException(string message, Exception innerException) : base(message, innerException) { } /// /// Initializes a new instance of the class. /// /// Serialization info. /// Streaming context. protected HttpOperationException(SerializationInfo info, StreamingContext context) : base(info, context) { } } }