diff --git a/session-manager-android/src/main/java/com/web3auth/session_manager_android/SessionManager.kt b/session-manager-android/src/main/java/com/web3auth/session_manager_android/SessionManager.kt index c3400ca..c94b03a 100644 --- a/session-manager-android/src/main/java/com/web3auth/session_manager_android/SessionManager.kt +++ b/session-manager-android/src/main/java/com/web3auth/session_manager_android/SessionManager.kt @@ -148,12 +148,7 @@ class SessionManager(context: Context, sessionTime: Int = 86400, allowedOrigin: Hex.decode(ecies.ephemPublicKey) ) String(share, Charsets.UTF_8) - }.handle { result, exception -> - if (exception != null) { - return@handle "Error: ${exception.message}" - } - result - } + }.exceptionally { throw it } } /** @@ -230,13 +225,7 @@ class SessionManager(context: Context, sessionTime: Int = 86400, allowedOrigin: ) } } - }.handle { result, exception -> - if (exception != null) { - false - } else { - result - } - } + }.exceptionally { throw it } } /** @@ -310,11 +299,6 @@ class SessionManager(context: Context, sessionTime: Int = 86400, allowedOrigin: ) } newSessionKey - }.handle { result, exception -> - if (exception != null) { - return@handle "Error: ${exception.message}" - } - result - } + }.exceptionally { throw it } } } \ No newline at end of file