diff --git a/src/NzbDrone.Common.Test/InstrumentationTests/SentryTargetFixture.cs b/src/NzbDrone.Common.Test/InstrumentationTests/SentryTargetFixture.cs index dc0fbaffb..0d6ec6d0f 100644 --- a/src/NzbDrone.Common.Test/InstrumentationTests/SentryTargetFixture.cs +++ b/src/NzbDrone.Common.Test/InstrumentationTests/SentryTargetFixture.cs @@ -1,4 +1,5 @@ using System; +using System.Data.SQLite; using System.Globalization; using System.Linq; using FluentAssertions; @@ -21,6 +22,7 @@ public class SentryTargetFixture : TestBase private static Exception[] FilteredExceptions = new Exception[] { new UnauthorizedAccessException(), + new SQLiteException(SQLiteErrorCode.Locked, "database is locked"), new AggregateException(new Exception[] { new UnauthorizedAccessException(), @@ -30,6 +32,7 @@ public class SentryTargetFixture : TestBase private static Exception[] NonFilteredExceptions = new Exception[] { + new SQLiteException(SQLiteErrorCode.Error, "it's borked"), new AggregateException(new Exception[] { new UnauthorizedAccessException(), diff --git a/src/NzbDrone.Common/Instrumentation/Sentry/SentryTarget.cs b/src/NzbDrone.Common/Instrumentation/Sentry/SentryTarget.cs index ac8f6f522..45cc679c4 100644 --- a/src/NzbDrone.Common/Instrumentation/Sentry/SentryTarget.cs +++ b/src/NzbDrone.Common/Instrumentation/Sentry/SentryTarget.cs @@ -248,7 +248,7 @@ public bool IsSentryMessage(LogEventInfo logEvent) var isSentry = true; var sqlEx = ex as SQLiteException; - if (sqlEx != null && !FilteredSQLiteErrors.Contains(sqlEx.ResultCode)) + if (sqlEx != null && FilteredSQLiteErrors.Contains(sqlEx.ResultCode)) { isSentry = false; }