failures.AddIfNotNull(newValidationFailure("BaseUrl","Sonarr URL is invalid, Prowlarr cannot connect to Sonarr - are you missing a URL base?"));
failures.AddIfNotNull(newValidationFailure("BaseUrl","Sonarr URL is invalid, Prowlarr cannot connect to Sonarr - are you missing a URL base?"));
break;
break;
caseHttpStatusCode.NotFound:
caseHttpStatusCode.NotFound:
_logger.Error(ex,"Sonarr not found");
_logger.Warn(ex,"Sonarr not found");
failures.AddIfNotNull(newValidationFailure("BaseUrl","Sonarr URL is invalid, Prowlarr cannot connect to Sonarr. Is Sonarr running and accessible? Sonarr v2 is not supported."));
failures.AddIfNotNull(newValidationFailure("BaseUrl","Sonarr URL is invalid, Prowlarr cannot connect to Sonarr. Is Sonarr running and accessible? Sonarr v2 is not supported."));
break;
break;
default:
default:
_logger.Error(ex,"Unable to complete application test");
_logger.Warn(ex,"Unable to complete application test");
failures.AddIfNotNull(newValidationFailure("BaseUrl",$"Unable to complete application test, cannot connect to Sonarr. {ex.Message}"));
failures.AddIfNotNull(newValidationFailure("BaseUrl",$"Unable to complete application test, cannot connect to Sonarr. {ex.Message}"));