Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
luckyrat committed Mar 7, 2024
1 parent 0066e91 commit 56aa932
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
<!-- There's an Android bug that causes biometric authentication crashes
if backups are not enabled but we don't actually want to enable them.
Thus we turn them on but ensure only empty entities are included. -->
<!-- FlutterFragmentActivity prevents use of predictive back in Android 14+
https://github.com/flutter/engine/pull/44865 -->

<activity
android:name=".MainActivity"
Expand Down
6 changes: 4 additions & 2 deletions lib/extension_methods.dart
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,15 @@ extension DioHelperHandleException on DioException {
return;
} else {
// Something happened in setting up or sending the request that triggered an Error
if (type == DioExceptionType.connectionTimeout) {
if (type == DioExceptionType.connectionTimeout || type == DioExceptionType.connectionError) {
throw KeeServerUnreachableException();
}
if (type == DioExceptionType.receiveTimeout || type == DioExceptionType.sendTimeout) {
throw KeeServerTimeoutException();
}
if (type == DioExceptionType.unknown) {
if (type == DioExceptionType.badCertificate ||
type == DioExceptionType.cancel ||
type == DioExceptionType.unknown) {
throw KeeServerUnreachableException();
}
throw KeeUnexpectedException('[$context] DioException with no response', this, s);
Expand Down

0 comments on commit 56aa932

Please sign in to comment.