mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-10-30 15:32:31 +01:00
Log response content from Kodi when checking for errors
This commit is contained in:
parent
fb44e67ea8
commit
d0acbe992e
@ -1,4 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using NLog;
|
||||
using NzbDrone.Common.Extensions;
|
||||
using NzbDrone.Common.Serializer;
|
||||
@ -122,13 +122,14 @@ namespace NzbDrone.Core.Notifications.Xbmc
|
||||
|
||||
private void CheckForError(IRestResponse response)
|
||||
{
|
||||
_logger.Debug("Looking for error in response: {0}", response);
|
||||
|
||||
if (string.IsNullOrWhiteSpace(response.Content))
|
||||
{
|
||||
throw new XbmcJsonException("Invalid response from XBMC, the response is not valid JSON");
|
||||
}
|
||||
|
||||
_logger.Trace("Looking for error in response, {0}", response.Content);
|
||||
|
||||
if (response.Content.StartsWith("{\"error\""))
|
||||
{
|
||||
var error = Json.Deserialize<ErrorResult>(response.Content);
|
||||
|
Loading…
Reference in New Issue
Block a user