@yuno-payments/yuno-sdk-react-native 1.0.17-rc.7 → 1.0.17-rc.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -26,6 +26,7 @@ import kotlinx.coroutines.CoroutineScope
26
26
  import kotlinx.coroutines.Dispatchers
27
27
  import kotlinx.coroutines.flow.launchIn
28
28
  import kotlinx.coroutines.flow.onEach
29
+ import kotlinx.coroutines.flow.catch
29
30
  import androidx.lifecycle.asFlow
30
31
 
31
32
  /**
@@ -903,6 +904,10 @@ class YunoSdkModule(private val reactContext: ReactApplicationContext) :
903
904
  promise.reject("TOKEN_GENERATION_ERROR", e.message)
904
905
  }
905
906
  }
907
+ .catch { e ->
908
+ Log.e(TAG, "❌ Flow error in token generation: ${e.message}")
909
+ promise.reject("TOKEN_GENERATION_ERROR", e.message ?: "Unknown error in token generation flow")
910
+ }
906
911
  .launchIn(CoroutineScope(Dispatchers.Main))
907
912
  } catch (e: Exception) {
908
913
  Log.e(TAG, "❌ Error in generateToken: ${e.message}")
@@ -962,6 +967,10 @@ class YunoSdkModule(private val reactContext: ReactApplicationContext) :
962
967
  promise.reject("THREE_DS_ERROR", e.message)
963
968
  }
964
969
  }
970
+ .catch { e ->
971
+ Log.e(TAG, "❌ Flow error in 3DS challenge: ${e.message}")
972
+ promise.reject("THREE_DS_ERROR", e.message ?: "Unknown error in 3DS challenge flow")
973
+ }
965
974
  .launchIn(CoroutineScope(Dispatchers.Main))
966
975
  } catch (e: Exception) {
967
976
  Log.e(TAG, "❌ Error in getThreeDSecureChallenge: ${e.message}")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yuno-payments/yuno-sdk-react-native",
3
- "version": "1.0.17-rc.7",
3
+ "version": "1.0.17-rc.8",
4
4
  "description": "Yuno React Native SDK empowers you to create seamless payment experiences in your native Android and iOS apps built with React Native.",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",