mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-11-22 13:55:30 +00:00
Follow the Schedules Direct API contract when refreshing the guide
Original-merge: 85fa90cb75
Merged-by: Bond-009 <bond.009@outlook.com>
Backported-by: Cody Robibero <cody@robibe.ro>
32 lines
1.1 KiB
C#
32 lines
1.1 KiB
C#
using System.Net;
|
|
using System.Net.Http;
|
|
|
|
namespace MediaBrowser.Common.Net;
|
|
|
|
/// <summary>
|
|
/// An <see cref="HttpRequestException"/> that retains the body of the failed response.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Providers report why they refused a request in the response body, which
|
|
/// <see cref="HttpResponseMessage.EnsureSuccessStatusCode"/> discards.
|
|
/// </remarks>
|
|
public class HttpResponseBodyException : HttpRequestException
|
|
{
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="HttpResponseBodyException"/> class.
|
|
/// </summary>
|
|
/// <param name="message">The exception message.</param>
|
|
/// <param name="statusCode">The status code of the failed response.</param>
|
|
/// <param name="responseBody">The body of the failed response.</param>
|
|
public HttpResponseBodyException(string message, HttpStatusCode? statusCode, string? responseBody)
|
|
: base(message, null, statusCode)
|
|
{
|
|
ResponseBody = responseBody;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the body of the failed response.
|
|
/// </summary>
|
|
public string? ResponseBody { get; }
|
|
}
|