clearer exception handling in OIDCHttpClient::checkOIDCIsAvailable()

This commit is contained in:
Florent Azavant
2025-01-27 11:16:54 +01:00
committed by Dat H. Pham
parent 03819a7a9b
commit 35b90ba87a
4 changed files with 30 additions and 1 deletions
+4
View File
@@ -1,3 +1,5 @@
import 'dart:io';
import 'package:core/domain/exceptions/web_session_exception.dart';
import 'package:core/presentation/state/failure.dart';
import 'package:core/presentation/utils/app_toast.dart';
@@ -49,6 +51,8 @@ class ToastManager {
return AppLocalizations.of(context).notFoundSession;
} else if (exception is NoNetworkError) {
return AppLocalizations.of(context).youAreOffline;
} else if (exception is HandshakeException) {
return AppLocalizations.of(context).handshakeException(exception.osError?.message ?? '');
} else {
try {
return AppLocalizations.of(context).unexpectedError(exception.message);