Bugfix/sentry and fixes (#243)

* Generate SeriesMetadata when creating Series from Scanner.

* Ignore errors from BookService

* Fixed a case where we used First() when it should have been FirstOrDefault() to fail when there are no cover images (or images)
This commit is contained in:
Joseph Milazzo 2021-06-01 19:42:43 -05:00 committed by GitHub
parent ce35c4f84a
commit 5083608f24
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 13 deletions

View file

@ -100,11 +100,12 @@ namespace API
options.AddExceptionFilterForType<NetVips.VipsException>();
options.AddExceptionFilterForType<InvalidDataException>();
options.AddExceptionFilterForType<KavitaException>();
options.BeforeSend = sentryEvent =>
{
if (sentryEvent.Exception != null
&& sentryEvent.Exception.Message.Contains("[GetCoverImage] This archive cannot be read:"))
&& sentryEvent.Exception.Message.Contains("[GetCoverImage] This archive cannot be read:")
&& sentryEvent.Exception.Message.Contains("[BookService] "))
{
return null; // Don't send this event to Sentry
}