display Unexpected error: {exception message} instead of Unknown error upon login

This commit is contained in:
Florent Azavant
2025-01-13 16:00:09 +01:00
committed by Dat H. Pham
parent 9d54709fac
commit 03819a7a9b
3 changed files with 21 additions and 1 deletions
+5 -1
View File
@@ -50,7 +50,11 @@ class ToastManager {
} else if (exception is NoNetworkError) {
return AppLocalizations.of(context).youAreOffline;
} else {
return null;
try {
return AppLocalizations.of(context).unexpectedError(exception.message);
} catch(_) {
return AppLocalizations.of(context).unexpectedError(exception.toString());
}
}
}