From c524f3919ef019092d3bcfa246870bc3f16070c5 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 21 Jul 2014 21:29:06 -0400 Subject: added cloud sync model objects --- MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs | 3 ++- MediaBrowser.Server.Implementations/HttpServer/Security/AuthService.cs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'MediaBrowser.Server.Implementations/HttpServer') diff --git a/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs b/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs index f530564ea..94715b490 100644 --- a/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs +++ b/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs @@ -76,7 +76,8 @@ namespace MediaBrowser.Server.Implementations.HttpServer {typeof (InvalidOperationException), 422}, {typeof (ResourceNotFoundException), 404}, {typeof (FileNotFoundException), 404}, - {typeof (DirectoryNotFoundException), 404} + {typeof (DirectoryNotFoundException), 404}, + {typeof (Implementations.Security.AuthenticationException), 401} }; HostConfig.Instance.DebugMode = true; diff --git a/MediaBrowser.Server.Implementations/HttpServer/Security/AuthService.cs b/MediaBrowser.Server.Implementations/HttpServer/Security/AuthService.cs index 1933cc716..ebb5ab741 100644 --- a/MediaBrowser.Server.Implementations/HttpServer/Security/AuthService.cs +++ b/MediaBrowser.Server.Implementations/HttpServer/Security/AuthService.cs @@ -74,7 +74,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer.Security if (user != null && user.Configuration.IsDisabled) { - throw new UnauthorizedAccessException("User account has been disabled."); + throw new AuthenticationException("User account has been disabled."); } if (!string.IsNullOrWhiteSpace(auth.DeviceId) && -- cgit v1.2.3