From 047d6badb0c337a2c6b346bd31c9f21c08f8e045 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Sat, 16 Mar 2024 22:18:24 +0530 Subject: [PATCH] fix(core): do not capture failed network requests for Sentry Fixes COMPOSE-LOBSTERS-2Q --- .../dev/msfjarvis/claw/core/injection/OkHttpModule.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/src/main/kotlin/dev/msfjarvis/claw/core/injection/OkHttpModule.kt b/core/src/main/kotlin/dev/msfjarvis/claw/core/injection/OkHttpModule.kt index 58fc353c..a68c337a 100644 --- a/core/src/main/kotlin/dev/msfjarvis/claw/core/injection/OkHttpModule.kt +++ b/core/src/main/kotlin/dev/msfjarvis/claw/core/injection/OkHttpModule.kt @@ -1,5 +1,5 @@ /* - * Copyright © 2022-2023 Harsh Shandilya. + * Copyright © 2022-2024 Harsh Shandilya. * Use of this source code is governed by an MIT-style * license that can be found in the LICENSE file or at * https://opensource.org/licenses/MIT. @@ -92,7 +92,9 @@ interface OkHttpModule { @Provides @IntoSet fun provideSentryInterceptor(): Interceptor { - return SentryOkHttpInterceptor() + // Disable capturing of failed requests since there is no real upstream for this app, + // if something is going wrong it is almost always someone else's problem. + return SentryOkHttpInterceptor(captureFailedRequests = false) } } }