TF-4136 Remove check sentry dio interceptors duplicated
This commit is contained in:
@@ -5,11 +5,6 @@ import 'package:sentry_dio/sentry_dio.dart';
|
|||||||
class SentryDioHelper {
|
class SentryDioHelper {
|
||||||
static void addIfAvailable(Dio dio) {
|
static void addIfAvailable(Dio dio) {
|
||||||
if (!SentryManager.instance.isSentryAvailable) return;
|
if (!SentryManager.instance.isSentryAvailable) return;
|
||||||
|
dio.addSentry();
|
||||||
final alreadyHasSentry = dio.interceptors.any(
|
|
||||||
(i) => i.runtimeType.toString().contains('FailedRequestInterceptor'));
|
|
||||||
if (!alreadyHasSentry) {
|
|
||||||
dio.addSentry();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user