diff --git a/lib/features/download/data/datasource_impl/download_datasource_impl.dart b/lib/features/download/data/datasource_impl/download_datasource_impl.dart index cbc789f2b..2608b6b27 100644 --- a/lib/features/download/data/datasource_impl/download_datasource_impl.dart +++ b/lib/features/download/data/datasource_impl/download_datasource_impl.dart @@ -40,10 +40,7 @@ class DownloadDatasourceImpl extends DownloadDatasource { onReceiveController: onReceiveController, cancelToken: cancelToken, ); - }).catchError((error, stackTrace) async { - await _exceptionThrower.throwException(error, stackTrace); - throw error; - }); + }).catchError(_exceptionThrower.throwException); } @override @@ -67,9 +64,6 @@ class DownloadDatasourceImpl extends DownloadDatasource { onReceiveController: onReceiveController, cancelToken: cancelToken, ); - }).catchError((error, stackTrace) async { - await _exceptionThrower.throwException(error, stackTrace); - throw error; - }); + }).catchError(_exceptionThrower.throwException); } } diff --git a/lib/features/labels/data/datasource_impl/label_datasource_impl.dart b/lib/features/labels/data/datasource_impl/label_datasource_impl.dart index 22ad004c4..22351bbc3 100644 --- a/lib/features/labels/data/datasource_impl/label_datasource_impl.dart +++ b/lib/features/labels/data/datasource_impl/label_datasource_impl.dart @@ -14,19 +14,13 @@ class LabelDatasourceImpl extends LabelDatasource { Future> getAllLabels(AccountId accountId) { return Future.sync(() async { return await _labelApi.getAllLabels(accountId); - }).catchError((error, stackTrace) async { - await _exceptionThrower.throwException(error, stackTrace); - throw error; - }); + }).catchError(_exceptionThrower.throwException); } @override Future