mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-06 22:03:16 +02:00
Change to ResourceNotFoundException
This commit is contained in:
parent
9a01cd8590
commit
2967dd6afd
|
@ -12,6 +12,7 @@ using Jellyfin.Data.Entities;
|
||||||
using Jellyfin.Data.Enums;
|
using Jellyfin.Data.Enums;
|
||||||
using MediaBrowser.Common;
|
using MediaBrowser.Common;
|
||||||
using MediaBrowser.Common.Cryptography;
|
using MediaBrowser.Common.Cryptography;
|
||||||
|
using MediaBrowser.Common.Extensions;
|
||||||
using MediaBrowser.Common.Net;
|
using MediaBrowser.Common.Net;
|
||||||
using MediaBrowser.Controller.Authentication;
|
using MediaBrowser.Controller.Authentication;
|
||||||
using MediaBrowser.Controller.Drawing;
|
using MediaBrowser.Controller.Drawing;
|
||||||
|
@ -198,7 +199,7 @@ namespace Jellyfin.Server.Implementations.Users
|
||||||
var user = dbContext.Users.Find(userId);
|
var user = dbContext.Users.Find(userId);
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException(nameof(userId));
|
throw new ResourceNotFoundException(nameof(userId));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dbContext.Users.Find(user.Id) == null)
|
if (dbContext.Users.Find(user.Id) == null)
|
||||||
|
|
Loading…
Reference in a new issue