mirror of
https://github.com/Radarr/Radarr
synced 2024-12-25 09:21:57 +00:00
Fixed: Error handling of valid, empty responses from Plex Media Server
This commit is contained in:
parent
cf662291d5
commit
3d20fd8f96
1 changed files with 5 additions and 0 deletions
|
@ -240,6 +240,11 @@ private void CheckForError(IRestResponse response, PlexServerSettings settings)
|
|||
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;
|
||||
|
|
Loading…
Reference in a new issue