Explorar el Código

Change to ResourceNotFoundException

Patrick Barron hace 5 años
padre
commit
2967dd6afd
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      Jellyfin.Server.Implementations/Users/UserManager.cs

+ 2 - 1
Jellyfin.Server.Implementations/Users/UserManager.cs

@@ -12,6 +12,7 @@ using Jellyfin.Data.Entities;
 using Jellyfin.Data.Enums;
 using MediaBrowser.Common;
 using MediaBrowser.Common.Cryptography;
+using MediaBrowser.Common.Extensions;
 using MediaBrowser.Common.Net;
 using MediaBrowser.Controller.Authentication;
 using MediaBrowser.Controller.Drawing;
@@ -198,7 +199,7 @@ namespace Jellyfin.Server.Implementations.Users
             var user = dbContext.Users.Find(userId);
             if (user == null)
             {
-                throw new ArgumentNullException(nameof(userId));
+                throw new ResourceNotFoundException(nameof(userId));
             }
 
             if (dbContext.Users.Find(user.Id) == null)