Page MenuHomePhabricator

[web] fix uncaught exception when user cancels SIWE
ClosedPublic

Authored by varun on Jun 21 2024, 4:55 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 28, 2:44 PM
Unknown Object (File)
Thu, Nov 28, 2:00 PM
Unknown Object (File)
Thu, Nov 28, 4:56 AM
Unknown Object (File)
Mon, Nov 25, 6:23 AM
Unknown Object (File)
Sun, Nov 24, 8:45 PM
Unknown Object (File)
Sun, Nov 24, 2:44 AM
Unknown Object (File)
Nov 15 2024, 2:00 AM
Unknown Object (File)
Nov 7 2024, 3:55 PM
Subscribers

Details

Summary

if a user cancels the request to sign the SIWE message from their wallet, we get an uncaught exception. wrap the call to signMessage with a try-catch to fix this bug

Depends on D12548

Test Plan

canceled SIWE message signing from my wallet and didn't get an uncaught exception

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

varun requested review of this revision.Jun 21 2024, 5:13 PM

Can any other errors be thrown by signer.signMessage? Should we still throw them if so?

In D12549#355466, @inka wrote:

Can any other errors be thrown by signer.signMessage? Should we still throw them if so?

I think we have to swallow the error here no matter what. If we re-throw, we get an uncaught exception error. Regardless of the error, the user will have to click the sign in button again to be prompted to sign a new message from their wallet

This revision is now accepted and ready to land.Jun 24 2024, 10:17 AM