Added sentry

This commit is contained in:
Juan Gilsanz Polo
2024-02-24 02:06:11 +01:00
parent ac340c108b
commit da995b8961
13 changed files with 80 additions and 14 deletions

View File

@@ -1,4 +1,5 @@
import 'package:dio/dio.dart';
import 'package:sentry_flutter/sentry_flutter.dart';
import 'package:linkdy/constants/enums.dart';
import 'package:linkdy/models/api_response.dart';
@@ -46,6 +47,7 @@ class ApiClientService {
content: BookmarksResponse.fromJson(response.data),
);
} catch (e, stackTrace) {
Sentry.captureException(e, stackTrace: stackTrace);
return const ApiResponse(successful: false);
}
}
@@ -63,6 +65,7 @@ class ApiClientService {
content: CheckBookmark.fromJson(response.data),
);
} catch (e, stackTrace) {
Sentry.captureException(e, stackTrace: stackTrace);
return const ApiResponse(successful: false);
}
}
@@ -78,6 +81,7 @@ class ApiClientService {
content: Bookmark.fromJson(response.data),
);
} catch (e, stackTrace) {
Sentry.captureException(e, stackTrace: stackTrace);
return const ApiResponse(successful: false);
}
}
@@ -97,6 +101,7 @@ class ApiClientService {
content: TagsResponse.fromJson(response.data),
);
} catch (e, stackTrace) {
Sentry.captureException(e, stackTrace: stackTrace);
return const ApiResponse(successful: false);
}
}