diff options
| author | Bond-009 <bond.009@outlook.com> | 2020-09-08 11:49:56 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-08 11:49:56 +0000 |
| commit | b76d4ba454c43cc6293b733f2bba363e34a9bf5e (patch) | |
| tree | 8ea3d9999b3cc18f16a4fdffb0baa6c4517057b8 | |
| parent | 5c7cdfe428ad4517a43466961cf73af3e361dd7b (diff) | |
| parent | e7727563288480e6eee541b96a4b97dbb0fef9d7 (diff) | |
Merge pull request #4096 from crobibero/auth-ex
Fix catching authentication exception
| -rw-r--r-- | Jellyfin.Server/Middleware/ExceptionMiddleware.cs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Jellyfin.Server/Middleware/ExceptionMiddleware.cs b/Jellyfin.Server/Middleware/ExceptionMiddleware.cs index 63effafc1..fb1ee3b2b 100644 --- a/Jellyfin.Server/Middleware/ExceptionMiddleware.cs +++ b/Jellyfin.Server/Middleware/ExceptionMiddleware.cs @@ -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 _: |
