1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2025-02-26 07:53:36 +00:00

Fixed: Error handling of valid, empty responses from Plex Media Server

This commit is contained in:
Mark McDowall 2016-12-05 09:34:17 -08:00
parent cf662291d5
commit 3d20fd8f96

View file

@ -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<PlexError>(response.Content) :
Json.Deserialize<PlexResponse<PlexError>>(response.Content).MediaContainer;