aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Helpers/AudioHelper.cs
diff options
context:
space:
mode:
authorcrobibero <cody@robibe.ro>2020-11-13 11:14:44 -0700
committercrobibero <cody@robibe.ro>2020-11-13 11:14:44 -0700
commit5f52a58e785fa4ae06fa07a93b81c1e7547ac9f3 (patch)
tree68466ae2c11051e631a4cf06a43cf14da1f4d756 /Jellyfin.Api/Helpers/AudioHelper.cs
parentbe312f992d92433e3e7619e264889d1a0afadf26 (diff)
Convert NullReferenceException to ResourceNotFoundException
Diffstat (limited to 'Jellyfin.Api/Helpers/AudioHelper.cs')
-rw-r--r--Jellyfin.Api/Helpers/AudioHelper.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Jellyfin.Api/Helpers/AudioHelper.cs b/Jellyfin.Api/Helpers/AudioHelper.cs
index c6d577b19..21ec2d32f 100644
--- a/Jellyfin.Api/Helpers/AudioHelper.cs
+++ b/Jellyfin.Api/Helpers/AudioHelper.cs
@@ -4,6 +4,7 @@ using System.Threading;
using System.Threading.Tasks;
using Jellyfin.Api.Models.StreamingDtos;
using MediaBrowser.Common.Configuration;
+using MediaBrowser.Common.Extensions;
using MediaBrowser.Common.Net;
using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Devices;
@@ -101,7 +102,7 @@ namespace Jellyfin.Api.Helpers
{
if (_httpContextAccessor.HttpContext == null)
{
- throw new NullReferenceException(nameof(_httpContextAccessor.HttpContext));
+ throw new ResourceNotFoundException(nameof(_httpContextAccessor.HttpContext));
}
bool isHeadRequest = _httpContextAccessor.HttpContext.Request.Method == System.Net.WebRequestMethods.Http.Head;