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)
Fri, Nov 15, 2:00 AM
Unknown Object (File)
Thu, Nov 7, 3:55 PM
Unknown Object (File)
Wed, Nov 6, 7:44 AM
Unknown Object (File)
Sun, Nov 3, 4:56 AM
Unknown Object (File)
Sat, Nov 2, 10:08 AM
Unknown Object (File)
Fri, Nov 1, 5:30 PM
Unknown Object (File)
Tue, Oct 29, 9:11 PM
Unknown Object (File)
Fri, Oct 25, 1:43 AM
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
Lint Not Applicable
Unit
Tests Not Applicable

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