mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-24 19:16:32 +00:00
remove custom HttpException
This commit is contained in:
@@ -6,6 +6,7 @@ using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Emby.Naming.Audio;
|
||||
@@ -2907,7 +2908,7 @@ namespace Emby.Server.Implementations.Library
|
||||
|
||||
return item.GetImageInfo(image.Type, imageIndex);
|
||||
}
|
||||
catch (HttpException ex)
|
||||
catch (HttpRequestException ex)
|
||||
{
|
||||
if (ex.StatusCode.HasValue
|
||||
&& (ex.StatusCode.Value == HttpStatusCode.NotFound || ex.StatusCode.Value == HttpStatusCode.Forbidden))
|
||||
|
||||
@@ -591,7 +591,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings
|
||||
savedToken.Value = DateTime.UtcNow.Ticks.ToString(CultureInfo.InvariantCulture);
|
||||
return result;
|
||||
}
|
||||
catch (HttpException ex)
|
||||
catch (HttpRequestException ex)
|
||||
{
|
||||
if (ex.StatusCode.HasValue)
|
||||
{
|
||||
@@ -621,7 +621,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings
|
||||
{
|
||||
return await _httpClientFactory.CreateClient(NamedClient.Default).SendAsync(options, completionOption, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
catch (HttpException ex)
|
||||
catch (HttpRequestException ex)
|
||||
{
|
||||
_tokens.Clear();
|
||||
|
||||
@@ -711,7 +711,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings
|
||||
|
||||
return root.lineups.Any(i => string.Equals(info.ListingsId, i.lineup, StringComparison.OrdinalIgnoreCase));
|
||||
}
|
||||
catch (HttpException ex)
|
||||
catch (HttpRequestException ex)
|
||||
{
|
||||
// Apparently we're supposed to swallow this
|
||||
if (ex.StatusCode.HasValue && ex.StatusCode.Value == HttpStatusCode.BadRequest)
|
||||
|
||||
@@ -143,7 +143,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun
|
||||
|
||||
return discoverResponse;
|
||||
}
|
||||
catch (HttpException ex)
|
||||
catch (HttpRequestException ex)
|
||||
{
|
||||
if (!throwAllExceptions && ex.StatusCode.HasValue && ex.StatusCode.Value == HttpStatusCode.NotFound)
|
||||
{
|
||||
@@ -663,7 +663,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun
|
||||
var modelInfo = await GetModelInfo(info, true, CancellationToken.None).ConfigureAwait(false);
|
||||
info.DeviceId = modelInfo.DeviceID;
|
||||
}
|
||||
catch (HttpException ex)
|
||||
catch (HttpRequestException ex)
|
||||
{
|
||||
if (ex.StatusCode.HasValue && ex.StatusCode.Value == System.Net.HttpStatusCode.NotFound)
|
||||
{
|
||||
|
||||
@@ -4,6 +4,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using MediaBrowser.Common.Updates;
|
||||
@@ -101,7 +102,7 @@ namespace Emby.Server.Implementations.ScheduledTasks
|
||||
throw;
|
||||
}
|
||||
}
|
||||
catch (HttpException ex)
|
||||
catch (HttpRequestException ex)
|
||||
{
|
||||
_logger.LogError(ex, "Error downloading {0}", package.Name);
|
||||
}
|
||||
|
||||
@@ -116,11 +116,6 @@ namespace Emby.Server.Implementations.Updates
|
||||
_logger.LogError(ex, "The URL configured for the plugin repository manifest URL is not valid: {Manifest}", manifest);
|
||||
return Array.Empty<PackageInfo>();
|
||||
}
|
||||
catch (HttpException ex)
|
||||
{
|
||||
_logger.LogError(ex, "An error occurred while accessing the plugin manifest: {Manifest}", manifest);
|
||||
return Array.Empty<PackageInfo>();
|
||||
}
|
||||
catch (HttpRequestException ex)
|
||||
{
|
||||
_logger.LogError(ex, "An error occurred while accessing the plugin manifest: {Manifest}", manifest);
|
||||
|
||||
Reference in New Issue
Block a user