Fixed: Improve exception logging when unable to connect to Plex Media Server
This commit is contained in:
parent
7922a3856e
commit
81c8fc0381
|
@ -1,4 +1,5 @@
|
||||||
using NzbDrone.Common.Exceptions;
|
using System;
|
||||||
|
using NzbDrone.Common.Exceptions;
|
||||||
|
|
||||||
namespace NzbDrone.Core.Notifications.Plex
|
namespace NzbDrone.Core.Notifications.Plex
|
||||||
{
|
{
|
||||||
|
@ -11,5 +12,9 @@ namespace NzbDrone.Core.Notifications.Plex
|
||||||
public PlexException(string message, params object[] args) : base(message, args)
|
public PlexException(string message, params object[] args) : base(message, args)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public PlexException(string message, Exception innerException) : base(message, innerException)
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -191,11 +191,11 @@ namespace NzbDrone.Core.Notifications.Plex.Server
|
||||||
throw new PlexAuthenticationException("Unauthorized - AuthToken is invalid");
|
throw new PlexAuthenticationException("Unauthorized - AuthToken is invalid");
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new PlexException("Unable to connect to Plex Media Server");
|
throw new PlexException("Unable to connect to Plex Media Server. Status Code: {0}", ex.Response.StatusCode);
|
||||||
}
|
}
|
||||||
catch (WebException ex)
|
catch (WebException ex)
|
||||||
{
|
{
|
||||||
throw new PlexException("Unable to connect to Plex Media Server");
|
throw new PlexException("Unable to connect to Plex Media Server", ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
return response.Content;
|
return response.Content;
|
||||||
|
|
Loading…
Reference in New Issue