mobilyflow-react-native-sdk 0.1.1-alpha.25 → 0.1.1-alpha.26

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.
@@ -217,14 +217,24 @@ class MobilyflowReactNativeSdkModule(reactContext: ReactApplicationContext) : Na
217
217
  override fun isForwardingEnable(uuid: String, externalRef: String, promise: Promise) {
218
218
  val executor = Executors.newSingleThreadExecutor()
219
219
  executor.execute {
220
- promise.resolve(_sdkInstances[uuid]!!.isForwardingEnable(externalRef))
220
+ try {
221
+ val result = _sdkInstances[uuid]!!.isForwardingEnable(externalRef)
222
+ promise.resolve(result)
223
+ } catch (error: Exception) {
224
+ throwError(error, promise)
225
+ }
221
226
  }
222
227
  }
223
228
 
224
229
  override fun getCustomer(uuid: String, promise: Promise) {
225
230
  val executor = Executors.newSingleThreadExecutor()
226
231
  executor.execute {
227
- promise.resolve(_sdkInstances[uuid]!!.getCustomer().toReadableMap())
232
+ try {
233
+ val result = _sdkInstances[uuid]!!.getCustomer().toReadableMap()
234
+ promise.resolve(result)
235
+ } catch (error: Exception) {
236
+ throwError(error, promise)
237
+ }
228
238
  }
229
239
  }
230
240
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mobilyflow-react-native-sdk",
3
- "version": "0.1.1-alpha.25",
3
+ "version": "0.1.1-alpha.26",
4
4
  "description": "MobilyFlow React Native SDK",
5
5
  "source": "./src/index.tsx",
6
6
  "main": "./lib/commonjs/index.js",