penumbra-zone / web

Apache License 2.0
12 stars 15 forks source link

Use error codes from core to show more helpful UIs when transactions fail #678

Open jessepinho opened 7 months ago

jessepinho commented 7 months ago

🚨 Blocked until https://github.com/penumbra-zone/penumbra/issues/3961 is addressed

Instead of parsing and showing raw errors from Tendermint, we should show custom error messages depending on an error code we get from core.

i.e., instead of ConnectError: [unknown] Tendermint: failed to deliver transaction: check_stateful failed: undelegation was prepared for next epoch 16 but the next epoch is 23, we should show Sorry, that transaction is now stale. Please try again. (based on the error code)

hdevalence commented 7 months ago

This will probably have to wait until post-mainnet, since we don't report error codes and changing that will require a lot of refactoring of the core code.