Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass original exceptions to the JS #212

Open
kober32 opened this issue Oct 16, 2024 · 0 comments
Open

Pass original exceptions to the JS #212

kober32 opened this issue Oct 16, 2024 · 0 comments

Comments

@kober32
Copy link
Member

kober32 commented Oct 16, 2024

!!! Note, that this should be done after Cordova is merged into the develop branch. Cordova has brand new files which copied this issue...

On Android, we're catching exceptions and passing our own errors:

For example here:
https://github.com/wultra/react-native-powerauth-mobile-sdk/blob/develop/android/src/main/java/com/wultra/android/powerauth/reactnative/PowerAuthModule.java#L430

this line should be

promise.reject(Errors.EC_BIOMETRY_FAILED, "Biometry dialog failed", error);

This passes the error to the React Native layer.

Improve PowerAuthErrorException reporting

When PowerAuthErrorException is passed in the way mentioned above, the getPowerAuthErrorCode is lost - we should somehow include it in a way that will be reported in the JS code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant