Merge pull request #4096 from crobibero/auth-ex

Fix catching authentication exception
This commit is contained in:
Bond-009 2020-09-08 11:49:56 +00:00 committed by GitHub
commit b76d4ba454
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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