π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Updated: Parsing error catched and logged
Muhammed Ayimen9d73a39b9d1e
diff --git a/lib/l10n/arb/app_en.arb b/lib/l10n/arb/app_en.arbindex 4d91fa4f44..595aca1b67 100644--- a/lib/l10n/arb/app_en.arb+++ b/lib/l10n/arb/app_en.arb@@ -398,5 +398,6 @@"iOSOkButton": "OK","@iOSOkButton": {"description": "Message showed on a button that the user can click to leave the current dialog. It is used on iOS side. Maximum 30 characters."- }+ },+ "parsingErrorText": "Error while parsing Google Auth QR code"}diff --git a/lib/ui/settings/data/import/analyze_qr_code.dart b/lib/ui/settings/data/import/analyze_qr_code.dartindex d842874320..481356fdc0 100644--- a/lib/ui/settings/data/import/analyze_qr_code.dart+++ b/lib/ui/settings/data/import/analyze_qr_code.dart@@ -11,6 +11,7 @@ import 'package:ente_auth/utils/toast_util.dart';import 'package:flutter/material.dart';import 'package:flutter/services.dart';import 'package:flutter_svg/svg.dart';+import 'package:logging/logging.dart';import 'package:mobile_scanner/mobile_scanner.dart';import 'package:wechat_assets_picker/wechat_assets_picker.dart';@@ -81,7 +82,14 @@ class _QrScannerState extends State<QrScanner> {scannerController.dispose();Navigator.of(context).pop(codes);} catch (e) {- debugPrint('Error occurred while parsing: $e');+ showToast(context, l10n.parsingErrorText);+ Logger("Code parsing error").severe(+ "Error while parsing Google Auth QR code",+ e,+ );+ throw Exception(+ 'Failed to parse Google Auth QR code \n ${e.toString()}',+ );}} else {showToast(context, l10n.invalidQrCodeText);