fix(core): do not capture failed network requests for Sentry

Fixes COMPOSE-LOBSTERS-2Q
This commit is contained in:
Harsh Shandilya 2024-03-16 22:18:24 +05:30
parent 5c0b5bb4f7
commit 047d6badb0

View file

@ -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 * Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT. * https://opensource.org/licenses/MIT.
@ -92,7 +92,9 @@ interface OkHttpModule {
@Provides @Provides
@IntoSet @IntoSet
fun provideSentryInterceptor(): Interceptor { 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)
} }
} }
} }