ex.Response.Content.Contains("not support the requested query"))
{
_logger.Warn(ex,"Indexer does not support the query");
returnnewValidationFailure(string.Empty,"Indexer does not support the current query. Check if the categories and or searching for seasons/episodes are supported. Check the log for more details.");
}
_logger.Warn(ex,"Unable to connect to indexer");
if(ex.Response.HasHttpServerError)
{
returnnewValidationFailure(string.Empty,"Unable to connect to indexer, indexer's server is unavailable. Try again later. "+ex.Message);
returnnewValidationFailure(string.Empty,"Unable to connect to indexer, invalid credentials. "+ex.Message);
}
returnnewValidationFailure(string.Empty,"Unable to connect to indexer, check the log above the ValidationFailure for more details. "+ex.Message);
}
catch(HttpRequestExceptionex)
{
_logger.Warn(ex,"Unable to connect to indexer");
returnnewValidationFailure(string.Empty,"Unable to connect to indexer, please check your DNS settings and ensure IPv6 is working or disabled. "+ex.Message);
}
catch(TaskCanceledExceptionex)
{
_logger.Warn(ex,"Unable to connect to indexer");
returnnewValidationFailure(string.Empty,"Unable to connect to indexer, possibly due to a timeout. Try again or check your network settings. "+ex.Message);
returnnewValidationFailure(string.Empty,"Unable to connect to indexer connection failure. Check your connection to the indexer's server and DNS."+webException.Message);