fixup! New: Improve Indexer Error Handling and Messaging

This commit is contained in:
Bakerboy448 2023-06-01 08:51:07 -05:00
parent a315ef027d
commit 5136e59c8f
1 changed files with 3 additions and 0 deletions

View File

@ -375,6 +375,7 @@ namespace NzbDrone.Core.Indexers
catch (RequestLimitReachedException ex) catch (RequestLimitReachedException ex)
{ {
_logger.Warn("Request limit reached: " + ex.Message); _logger.Warn("Request limit reached: " + ex.Message);
return new ValidationFailure(string.Empty, "Request limit reached: " + ex.Message); return new ValidationFailure(string.Empty, "Request limit reached: " + ex.Message);
} }
catch (CloudFlareCaptchaException ex) catch (CloudFlareCaptchaException ex)
@ -419,11 +420,13 @@ namespace NzbDrone.Core.Indexers
{ {
return new ValidationFailure(string.Empty, "Unable to connect to indexer, invalid credentials. " + ex.Message); return new ValidationFailure(string.Empty, "Unable to connect to indexer, invalid credentials. " + ex.Message);
} }
return new ValidationFailure(string.Empty, "Unable to connect to indexer, check the log above the ValidationFailure for more details. " + ex.Message); return new ValidationFailure(string.Empty, "Unable to connect to indexer, check the log above the ValidationFailure for more details. " + ex.Message);
} }
catch (HttpRequestException ex) catch (HttpRequestException ex)
{ {
_logger.Warn(ex, "Unable to connect to indexer"); _logger.Warn(ex, "Unable to connect to indexer");
return new ValidationFailure(string.Empty, "Unable to connect to indexer, please check your DNS settings and ensure IPv6 is working or disabled. " + ex.Message); return new ValidationFailure(string.Empty, "Unable to connect to indexer, please check your DNS settings and ensure IPv6 is working or disabled. " + ex.Message);
} }
catch (TaskCanceledException ex) catch (TaskCanceledException ex)