mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-21 22:04:31 -04:00
New: Link to "Why Searches Could be Failing" wiki section
This commit is contained in:
@@ -218,13 +218,12 @@ namespace NzbDrone.Core.MetadataSource.BookInfo
|
||||
catch (HttpException ex)
|
||||
{
|
||||
_logger.Warn(ex, ex.Message);
|
||||
throw new GoodreadsException("Search for '{0}' failed. Unable to communicate with Goodreads.", title);
|
||||
throw new GoodreadsException("Search for '{0}' failed. Unable to communicate with Goodreads.", ex, title);
|
||||
}
|
||||
catch (Exception ex)
|
||||
catch (Exception ex) when (ex is not BookInfoException)
|
||||
{
|
||||
_logger.Warn(ex, ex.Message);
|
||||
throw new GoodreadsException("Search for '{0}' failed. Invalid response received from Goodreads.",
|
||||
title);
|
||||
throw new GoodreadsException("Search for '{0}' failed. Invalid response received from Goodreads.", ex, title);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -296,6 +295,11 @@ namespace NzbDrone.Core.MetadataSource.BookInfo
|
||||
{
|
||||
return MapSearchResult(ids);
|
||||
}
|
||||
catch (HttpException ex)
|
||||
{
|
||||
_logger.Warn(ex);
|
||||
throw new BookInfoException("Search for '{0}' failed. Unable to communicate with ReadarrAPI, returning status code: {1}.", ex, query, ex.Response.StatusCode);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_logger.Warn(e, "Error mapping search results");
|
||||
@@ -484,7 +488,7 @@ namespace NzbDrone.Core.MetadataSource.BookInfo
|
||||
httpRequest.ContentSummary = ids.ToJson(Formatting.None);
|
||||
|
||||
httpRequest.AllowAutoRedirect = true;
|
||||
httpRequest.SuppressHttpError = true;
|
||||
httpRequest.SuppressHttpErrorStatusCodes = new[] { HttpStatusCode.TooManyRequests };
|
||||
|
||||
httpResponse = _httpClient.Post<BulkBookResource>(httpRequest);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user