From 3d20fd8f9699d3e21a7bbd4faeeb1d4053d3681d Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Mon, 5 Dec 2016 09:34:17 -0800 Subject: [PATCH] Fixed: Error handling of valid, empty responses from Plex Media Server --- src/NzbDrone.Core/Notifications/Plex/PlexServerProxy.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/NzbDrone.Core/Notifications/Plex/PlexServerProxy.cs b/src/NzbDrone.Core/Notifications/Plex/PlexServerProxy.cs index 43658c5f6..251a54550 100644 --- a/src/NzbDrone.Core/Notifications/Plex/PlexServerProxy.cs +++ b/src/NzbDrone.Core/Notifications/Plex/PlexServerProxy.cs @@ -240,6 +240,11 @@ namespace NzbDrone.Core.Notifications.Plex throw new PlexAuthenticationException("Unauthorized - Username or password is incorrect"); } + if (response.Content.IsNullOrWhiteSpace()) + { + _logger.Trace("No response body returned, no error detected"); + } + var error = response.Content.Contains("_children") ? Json.Deserialize(response.Content) : Json.Deserialize>(response.Content).MediaContainer;