diff --git a/mobile/lib/modules/login/services/oauth.service.dart b/mobile/lib/modules/login/services/oauth.service.dart index f056898f36..e8b516d35a 100644 --- a/mobile/lib/modules/login/services/oauth.service.dart +++ b/mobile/lib/modules/login/services/oauth.service.dart @@ -1,4 +1,5 @@ import 'package:immich_mobile/shared/services/api.service.dart'; +import 'package:logging/logging.dart'; import 'package:openapi/api.dart'; import 'package:flutter_web_auth/flutter_web_auth.dart'; @@ -7,7 +8,7 @@ import 'package:flutter_web_auth/flutter_web_auth.dart'; class OAuthService { final ApiService _apiService; final callbackUrlScheme = 'app.immich'; - + final log = Logger('OAuthService'); OAuthService(this._apiService); Future getOAuthServerConfig( @@ -33,7 +34,8 @@ class OAuthService { url: result, ), ); - } catch (e) { + } catch (e, stack) { + log.severe("Error performing oAuthLogin: ${e.toString()}", e, stack); return null; } } diff --git a/mobile/lib/shared/services/asset.service.dart b/mobile/lib/shared/services/asset.service.dart index ce64a558a8..9165e6308f 100644 --- a/mobile/lib/shared/services/asset.service.dart +++ b/mobile/lib/shared/services/asset.service.dart @@ -82,8 +82,12 @@ class AssetService { _db.writeTxn(() => _db.eTags.put(ETag(id: user.id, value: newETag))); } return assets.map(Asset.remote).toList(); - } catch (e, stack) { - log.severe('Error while getting remote assets', e, stack); + } catch (error, stack) { + log.severe( + 'Error while getting remote assets: ${error.toString()}', + error, + stack, + ); return null; } } @@ -100,8 +104,8 @@ class AssetService { return await _apiService.assetApi .deleteAsset(DeleteAssetDto(ids: payload)); - } catch (e) { - debugPrint("Error getAllAsset ${e.toString()}"); + } catch (error, stack) { + log.severe("Error deleteAssets ${error.toString()}", error, stack); return null; } }