This uses the new @agoric/rpc and @agoric/web-components to make some improvements to error handling as a precursor to the node selector. The new package versions have a few improvements:
No longer use the batch vstorage API which is deprecated, instead poll each vstorage path from the API server separately
No longer have a separate onError handler for each vstorage path. For missing data, it now just yields an empty value, and server errors are surfaced to the single onError handler of the chainStorageWatcher
Add an error handler to wallet connection component for RPC/API errors which indicates which endpoint is failing (RPC or API)
Automatically retry all queries before surfacing onError (in both wallet connection component and chainStorageWatcher)
Fix some bugs in the wallet connection component around offer and smart-wallet-provision status updates
With all these changes, the dapp can now more gracefully and confidently handle server errors and show a more informative dialog instead of crashing with an unhelpful error message on the screen. In the future we can prompt the user to select a different node in this case, but for now just the dialog is being added.
refs https://github.com/Agoric/agoric-sdk/issues/8505 fixes https://github.com/Agoric/ui-kit/issues/57
This uses the new
@agoric/rpc
and@agoric/web-components
to make some improvements to error handling as a precursor to the node selector. The new package versions have a few improvements:onError
handler for each vstorage path. For missing data, it now just yields an emptyvalue
, and server errors are surfaced to the singleonError
handler of thechainStorageWatcher
onError
(in both wallet connection component andchainStorageWatcher
)With all these changes, the dapp can now more gracefully and confidently handle server errors and show a more informative dialog instead of crashing with an unhelpful error message on the screen. In the future we can prompt the user to select a different node in this case, but for now just the dialog is being added.
Screenshot