wharfkit / session

Create account-based sessions, perform transactions, and allow users to login using Antelope-based blockchains.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Explore the addition of an `onError` hook to allow plugins to capture errors and do something

aaroncox opened this issue · comments

The Error prompt in the web-ui-renderer could potentially be removed and a plugin for "Error Popups" could be created to take that role over. Developers could then replace the default "error plugin" with different behavior, such as triggering toasts or rendering them on a page element.

It should also allow an option, when initializing a session, to not handle errors. So that the anchor modal, for example, auto closes when you submit the tx, regardless of result/error.

This new option should allows handling of fees (if enabled) for resources etc, but should still apply if error is not covered by fees (non resource error).

This enables Dapps to auto handle their errors using their themed/localized notifications without them being obstructed by the wharf modal on error, and w/o requiring an additional plugin.