1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-04 10:02:40 +01:00

Log description for invalid API key response

Closes #838
This commit is contained in:
Mark McDowall 2015-10-07 00:09:03 -07:00
parent 0e90bf5227
commit 97f1761092

View File

@ -21,7 +21,11 @@ protected override bool PreProcess(IndexerResponse indexerResponse)
var code = Convert.ToInt32(error.Attribute("code").Value);
var errorMessage = error.Attribute("description").Value;
if (code >= 100 && code <= 199) throw new ApiKeyException("Invalid API key");
if (code >= 100 && code <= 199)
{
_logger.Warn("Invalid API Key: {0}", errorMessage);
throw new ApiKeyException("Invalid API key");
}
if (!indexerResponse.Request.Url.ToString().Contains("apikey=") && errorMessage == "Missing parameter")
{