瀏覽代碼

Merge pull request #4096 from crobibero/auth-ex

Fix catching authentication exception
Bond-009 4 年之前
父節點
當前提交
b76d4ba454
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      Jellyfin.Server/Middleware/ExceptionMiddleware.cs

+ 1 - 0
Jellyfin.Server/Middleware/ExceptionMiddleware.cs

@@ -125,6 +125,7 @@ namespace Jellyfin.Server.Middleware
             switch (ex)
             switch (ex)
             {
             {
                 case ArgumentException _: return StatusCodes.Status400BadRequest;
                 case ArgumentException _: return StatusCodes.Status400BadRequest;
+                case AuthenticationException _:
                 case SecurityException _: return StatusCodes.Status401Unauthorized;
                 case SecurityException _: return StatusCodes.Status401Unauthorized;
                 case DirectoryNotFoundException _:
                 case DirectoryNotFoundException _:
                 case FileNotFoundException _:
                 case FileNotFoundException _: