mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-17 22:43:07 +03:00
update directory picker
This commit is contained in:
@@ -273,10 +273,19 @@ namespace Emby.Server.Implementations.HttpServer
|
||||
return 400;
|
||||
}
|
||||
|
||||
var exceptionType = ex.GetType();
|
||||
|
||||
int statusCode;
|
||||
if (!_mapExceptionToStatusCode.TryGetValue(ex.GetType(), out statusCode))
|
||||
if (!_mapExceptionToStatusCode.TryGetValue(exceptionType, out statusCode))
|
||||
{
|
||||
statusCode = 500;
|
||||
if (string.Equals(exceptionType.Name, "DirectoryNotFoundException", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
statusCode = 404;
|
||||
}
|
||||
else
|
||||
{
|
||||
statusCode = 500;
|
||||
}
|
||||
}
|
||||
|
||||
return statusCode;
|
||||
|
||||
Reference in New Issue
Block a user