Fixed: Don't treat metadata errors as missing author/book entities

This commit is contained in:
Bogdan
2025-06-16 21:11:00 +03:00
parent f53c4dc017
commit 0f3e716044

View File

@@ -103,8 +103,8 @@ namespace NzbDrone.Core.MetadataSource.BookInfo
} }
catch (BookInfoException e) catch (BookInfoException e)
{ {
_logger.Warn(e, "Unexpected error getting author info"); _logger.Warn(e, "Unexpected error getting author info: {foreignAuthorId}", foreignAuthorId);
throw new AuthorNotFoundException(foreignAuthorId); throw;
} }
} }
@@ -126,8 +126,8 @@ namespace NzbDrone.Core.MetadataSource.BookInfo
} }
catch (BookInfoException e) catch (BookInfoException e)
{ {
_logger.Warn(e, "Unexpected error getting book info"); _logger.Warn(e, "Unexpected error getting book info: {foreignBookId}", foreignBookId);
throw new BookNotFoundException(foreignBookId); throw;
} }
} }
@@ -430,7 +430,7 @@ namespace NzbDrone.Core.MetadataSource.BookInfo
{ {
var author = PollAuthor(newId); var author = PollAuthor(newId);
book = author.Books.Value.Where(b => b.Editions.Value.Any(e => e.ForeignEditionId == id.ToString())).FirstOrDefault(); book = author.Books.Value.FirstOrDefault(b => b.Editions.Value.Any(e => e.ForeignEditionId == id.ToString()));
authors = new List<AuthorMetadata> { author.Metadata.Value }; authors = new List<AuthorMetadata> { author.Metadata.Value };
} }
else if (type == "work") else if (type == "work")