Fixed: (Apps) Lower the severity for common messages

pull/1778/head
Bogdan 11 months ago
parent 9bac2992b5
commit 3ce3f8acdd

@ -56,15 +56,15 @@ namespace NzbDrone.Core.Applications.Lidarr
switch (ex.Response.StatusCode)
{
case HttpStatusCode.Unauthorized:
_logger.Error(ex, "API Key is invalid");
_logger.Warn(ex, "API Key is invalid");
failures.AddIfNotNull(new ValidationFailure("ApiKey", "API Key is invalid"));
break;
case HttpStatusCode.BadRequest:
_logger.Error(ex, "Prowlarr URL is invalid");
_logger.Warn(ex, "Prowlarr URL is invalid");
failures.AddIfNotNull(new ValidationFailure("ProwlarrUrl", "Prowlarr URL is invalid, Lidarr cannot connect to Prowlarr"));
break;
case HttpStatusCode.SeeOther:
_logger.Error(ex, "Lidarr returned redirect and is invalid");
_logger.Warn(ex, "Lidarr returned redirect and is invalid");
failures.AddIfNotNull(new ValidationFailure("BaseUrl", "Lidarr URL is invalid, Prowlarr cannot connect to Lidarr - are you missing a URL base?"));
break;
default:

@ -141,22 +141,22 @@ namespace NzbDrone.Core.Applications.Lidarr
switch (ex.Response.StatusCode)
{
case HttpStatusCode.Unauthorized:
_logger.Error(ex, "API Key is invalid");
_logger.Warn(ex, "API Key is invalid");
break;
case HttpStatusCode.BadRequest:
if (ex.Response.Content.Contains("Query successful, but no results in the configured categories were returned from your indexer.", StringComparison.InvariantCultureIgnoreCase))
{
_logger.Error(ex, "No Results in configured categories. See FAQ Entry: Prowlarr will not sync X Indexer to App");
_logger.Warn(ex, "No Results in configured categories. See FAQ Entry: Prowlarr will not sync X Indexer to App");
break;
}
_logger.Error(ex, "Invalid Request");
break;
case HttpStatusCode.SeeOther:
_logger.Error(ex, "App returned redirect and is invalid. Check App URL");
_logger.Warn(ex, "App returned redirect and is invalid. Check App URL");
break;
case HttpStatusCode.NotFound:
_logger.Error(ex, "Remote indexer not found");
_logger.Warn(ex, "Remote indexer not found");
break;
default:
_logger.Error(ex, "Unexpected response status code: {0}", ex.Response.StatusCode);

@ -56,15 +56,15 @@ namespace NzbDrone.Core.Applications.Radarr
switch (ex.Response.StatusCode)
{
case HttpStatusCode.Unauthorized:
_logger.Error(ex, "API Key is invalid");
_logger.Warn(ex, "API Key is invalid");
failures.AddIfNotNull(new ValidationFailure("ApiKey", "API Key is invalid"));
break;
case HttpStatusCode.BadRequest:
_logger.Error(ex, "Prowlarr URL is invalid");
_logger.Warn(ex, "Prowlarr URL is invalid");
failures.AddIfNotNull(new ValidationFailure("ProwlarrUrl", "Prowlarr URL is invalid, Radarr cannot connect to Prowlarr"));
break;
case HttpStatusCode.SeeOther:
_logger.Error(ex, "Radarr returned redirect and is invalid");
_logger.Warn(ex, "Radarr returned redirect and is invalid");
failures.AddIfNotNull(new ValidationFailure("BaseUrl", "Radarr URL is invalid, Prowlarr cannot connect to Radarr - are you missing a URL base?"));
break;
default:

@ -154,22 +154,22 @@ namespace NzbDrone.Core.Applications.Radarr
switch (ex.Response.StatusCode)
{
case HttpStatusCode.Unauthorized:
_logger.Error(ex, "API Key is invalid");
_logger.Warn(ex, "API Key is invalid");
break;
case HttpStatusCode.BadRequest:
if (ex.Response.Content.Contains("Query successful, but no results in the configured categories were returned from your indexer.", StringComparison.InvariantCultureIgnoreCase))
{
_logger.Error(ex, "No Results in configured categories. See FAQ Entry: Prowlarr will not sync X Indexer to App");
_logger.Warn(ex, "No Results in configured categories. See FAQ Entry: Prowlarr will not sync X Indexer to App");
break;
}
_logger.Error(ex, "Invalid Request");
break;
case HttpStatusCode.SeeOther:
_logger.Error(ex, "App returned redirect and is invalid. Check App URL");
_logger.Warn(ex, "App returned redirect and is invalid. Check App URL");
break;
case HttpStatusCode.NotFound:
_logger.Error(ex, "Remote indexer not found");
_logger.Warn(ex, "Remote indexer not found");
break;
default:
_logger.Error(ex, "Unexpected response status code: {0}", ex.Response.StatusCode);

@ -56,15 +56,15 @@ namespace NzbDrone.Core.Applications.Readarr
switch (ex.Response.StatusCode)
{
case HttpStatusCode.Unauthorized:
_logger.Error(ex, "API Key is invalid");
_logger.Warn(ex, "API Key is invalid");
failures.AddIfNotNull(new ValidationFailure("ApiKey", "API Key is invalid"));
break;
case HttpStatusCode.BadRequest:
_logger.Error(ex, "Prowlarr URL is invalid");
_logger.Warn(ex, "Prowlarr URL is invalid");
failures.AddIfNotNull(new ValidationFailure("ProwlarrUrl", "Prowlarr URL is invalid, Readarr cannot connect to Prowlarr"));
break;
case HttpStatusCode.SeeOther:
_logger.Error(ex, "Readarr returned redirect and is invalid");
_logger.Warn(ex, "Readarr returned redirect and is invalid");
failures.AddIfNotNull(new ValidationFailure("BaseUrl", "Readarr URL is invalid, Prowlarr cannot connect to Readarr - are you missing a URL base?"));
break;
default:

@ -128,22 +128,22 @@ namespace NzbDrone.Core.Applications.Readarr
switch (ex.Response.StatusCode)
{
case HttpStatusCode.Unauthorized:
_logger.Error(ex, "API Key is invalid");
_logger.Warn(ex, "API Key is invalid");
break;
case HttpStatusCode.BadRequest:
if (ex.Response.Content.Contains("Query successful, but no results in the configured categories were returned from your indexer.", StringComparison.InvariantCultureIgnoreCase))
{
_logger.Error(ex, "No Results in configured categories. See FAQ Entry: Prowlarr will not sync X Indexer to App");
_logger.Warn(ex, "No Results in configured categories. See FAQ Entry: Prowlarr will not sync X Indexer to App");
break;
}
_logger.Error(ex, "Invalid Request");
break;
case HttpStatusCode.SeeOther:
_logger.Error(ex, "App returned redirect and is invalid. Check App URL");
_logger.Warn(ex, "App returned redirect and is invalid. Check App URL");
break;
case HttpStatusCode.NotFound:
_logger.Error(ex, "Remote indexer not found");
_logger.Warn(ex, "Remote indexer not found");
break;
default:
_logger.Error(ex, "Unexpected response status code: {0}", ex.Response.StatusCode);

@ -56,15 +56,15 @@ namespace NzbDrone.Core.Applications.Sonarr
switch (ex.Response.StatusCode)
{
case HttpStatusCode.Unauthorized:
_logger.Error(ex, "API Key is invalid");
_logger.Warn(ex, "API Key is invalid");
failures.AddIfNotNull(new ValidationFailure("ApiKey", "API Key is invalid"));
break;
case HttpStatusCode.BadRequest:
_logger.Error(ex, "Prowlarr URL is invalid");
_logger.Warn(ex, "Prowlarr URL is invalid");
failures.AddIfNotNull(new ValidationFailure("ProwlarrUrl", "Prowlarr URL is invalid, Sonarr cannot connect to Prowlarr"));
break;
case HttpStatusCode.SeeOther:
_logger.Error(ex, "Sonarr returned redirect and is invalid");
_logger.Warn(ex, "Sonarr returned redirect and is invalid");
failures.AddIfNotNull(new ValidationFailure("BaseUrl", "Sonarr URL is invalid, Prowlarr cannot connect to Sonarr - are you missing a URL base?"));
break;
case HttpStatusCode.NotFound:

@ -141,22 +141,22 @@ namespace NzbDrone.Core.Applications.Sonarr
switch (ex.Response.StatusCode)
{
case HttpStatusCode.Unauthorized:
_logger.Error(ex, "API Key is invalid");
_logger.Warn(ex, "API Key is invalid");
break;
case HttpStatusCode.BadRequest:
if (ex.Response.Content.Contains("Query successful, but no results in the configured categories were returned from your indexer.", StringComparison.InvariantCultureIgnoreCase))
{
_logger.Error(ex, "No Results in configured categories. See FAQ Entry: Prowlarr will not sync X Indexer to App");
_logger.Warn(ex, "No Results in configured categories. See FAQ Entry: Prowlarr will not sync X Indexer to App");
break;
}
_logger.Error(ex, "Invalid Request");
break;
case HttpStatusCode.SeeOther:
_logger.Error(ex, "App returned redirect and is invalid. Check App URL");
_logger.Warn(ex, "App returned redirect and is invalid. Check App URL");
break;
case HttpStatusCode.NotFound:
_logger.Error(ex, "Remote indexer not found");
_logger.Warn(ex, "Remote indexer not found");
break;
default:
_logger.Error(ex, "Unexpected response status code: {0}", ex.Response.StatusCode);

@ -56,15 +56,15 @@ namespace NzbDrone.Core.Applications.Whisparr
switch (ex.Response.StatusCode)
{
case HttpStatusCode.Unauthorized:
_logger.Error(ex, "API Key is invalid");
_logger.Warn(ex, "API Key is invalid");
failures.AddIfNotNull(new ValidationFailure("ApiKey", "API Key is invalid"));
break;
case HttpStatusCode.BadRequest:
_logger.Error(ex, "Prowlarr URL is invalid");
_logger.Warn(ex, "Prowlarr URL is invalid");
failures.AddIfNotNull(new ValidationFailure("ProwlarrUrl", "Prowlarr URL is invalid, Whisparr cannot connect to Prowlarr"));
break;
case HttpStatusCode.SeeOther:
_logger.Error(ex, "Whisparr returned redirect and is invalid");
_logger.Warn(ex, "Whisparr returned redirect and is invalid");
failures.AddIfNotNull(new ValidationFailure("BaseUrl", "Whisparr URL is invalid, Prowlarr cannot connect to Whisparr - are you missing a URL base?"));
break;
default:

@ -126,22 +126,22 @@ namespace NzbDrone.Core.Applications.Whisparr
switch (ex.Response.StatusCode)
{
case HttpStatusCode.Unauthorized:
_logger.Error(ex, "API Key is invalid");
_logger.Warn(ex, "API Key is invalid");
break;
case HttpStatusCode.BadRequest:
if (ex.Response.Content.Contains("Query successful, but no results in the configured categories were returned from your indexer.", StringComparison.InvariantCultureIgnoreCase))
{
_logger.Error(ex, "No Results in configured categories. See FAQ Entry: Prowlarr will not sync X Indexer to App");
_logger.Warn(ex, "No Results in configured categories. See FAQ Entry: Prowlarr will not sync X Indexer to App");
break;
}
_logger.Error(ex, "Invalid Request");
break;
case HttpStatusCode.SeeOther:
_logger.Error(ex, "App returned redirect and is invalid. Check App URL");
_logger.Warn(ex, "App returned redirect and is invalid. Check App URL");
break;
case HttpStatusCode.NotFound:
_logger.Error(ex, "Remote indexer not found");
_logger.Warn(ex, "Remote indexer not found");
break;
default:
_logger.Error(ex, "Unexpected response status code: {0}", ex.Response.StatusCode);

Loading…
Cancel
Save