near / near-wallet

Web wallet for NEAR Protocol which stores keys in browser's localStorage
https://wallet.near.org
MIT License
220 stars 176 forks source link

Improve error handling #289

Open vgrichina opened 4 years ago

vgrichina commented 4 years ago

Need to do fine-grained error handling once https://github.com/nearprotocol/nearcore/issues/1839 lands.

kcole16 commented 4 years ago

@vgrichina @marcinbodnar nearprotocol/nearcore#1839 is now merged

vgrichina commented 4 years ago

@kcole16 it's not live yet.

kcole16 commented 4 years ago

@vgrichina Re: your comments on Notion

I think it's counterproductive to list all possible errors. Instead it makes sense to start from what user can do in case of failure and distinguish recoverable / unrecoverable errors for given action.

How about determining the potential error states for these three categories, and what the user should do for each (as opposed to each action)?

kcole16 commented 4 years ago

Adding more detail to the above:

Thoughts? @vgrichina @Patrick1904 @marcinbodnar @corwinharrell

marcinbodnar commented 4 years ago

I gather some possible situations that are not handled, regarding user experience:

Create Account:

Protect your Account:

Send Money:

Login:

Reset Account:

No network:

bowenwang1996 commented 4 years ago

@kcole16 if rpc times out it is better to first check if the transaction is still valid to avoid sending double the amount of tokens for example.

ilblackdragon commented 4 years ago

I'm curious what is the status here?

I understand there are unstructured errors from nearcore, but for structured errors that are coming from runtime - can we show them to the user?

Because we still just showing "username is taken" even when contract for linkdrop has failed for example.

vgrichina commented 4 years ago

@ilblackdragon this is largely one by one implementation for different part of wallet. Some errors have specific handling, some still don't.