Errors thrown by rn-indy-sdk do not have the same signature as errors thrown by indy-sdk. For example in aries-framework-javscript when an error is thrown when trying to create a wallet we check whether the indyName of the error is WalletAlreadyExistsError. However the same error in rn-indy-sdk does not have the property indyName and therefore aries-framework-javascript will crash (see image and Unhandled promise rejection below)
'Unhandled promise rejection', [Error: {"code":"203","message":"org.hyperledger.indy.sdk.wallet.WalletExistsException: A wallet with the specified name already exists."}]
How to Solve
We discussed during aries-framework-javascript call and came to the conclusion we need to update IndySdkRejectResponse class (on Android side, not looked at iOS yet) to match the indy-sdk for NodeJS error.
Problem
Errors thrown by rn-indy-sdk do not have the same signature as errors thrown by indy-sdk. For example in aries-framework-javscript when an error is thrown when trying to create a wallet we check whether the
indyName
of the error isWalletAlreadyExistsError
. However the same error in rn-indy-sdk does not have the propertyindyName
and therefore aries-framework-javascript will crash (see image andUnhandled promise rejection below
)How to Solve
We discussed during aries-framework-javascript call and came to the conclusion we need to update
IndySdkRejectResponse
class (on Android side, not looked at iOS yet) to match the indy-sdk for NodeJS error.https://github.com/AbsaOSS/rn-indy-sdk/blob/43aff51c158cb871c12ce4247aa7df74690e51da/android/src/main/java/com/reactlibrary/IndySdkModule.java#L730-L765