Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Proper Error Handling for Near.Call #79

Open
roshaans opened this issue Jun 13, 2023 · 2 comments
Open

Feature Request: Proper Error Handling for Near.Call #79

roshaans opened this issue Jun 13, 2023 · 2 comments

Comments

@roshaans
Copy link
Contributor

roshaans commented Jun 13, 2023

There is no way to know weather a function call (Near.call) was successful or not. This ends up with bad UX when the TX fails and we are unable to provide users with a clear next step e.g (fill account with balance, add access key, e.t.c)

It would be nice to be have and be able to await the Near.asyncCall so it waits until the tx is processed and has a status. This will let us create flows when the function calls errors out and retry logic.
image

I would like to redirect the user to their newly created indexer page, but I am unable to do so because I am unsure if the transaction to create the indexer was successful or not

Side note:
Also, at the moment, the <CommitButton> does not do any sort of error handling or take in an onError callback handler to deal with errors. That would be pretty helpful too. This has nothing to do with Near.call error handling.

@petersalomonsen
Copy link
Contributor

You can get the transactionHashes parameter from the query string and then look up the transaction itself, and example on how to do this can be found here: https://github.com/near/neardevhub-widgets/pull/216/files#diff-27692a0e3c951377aef39dd183b67a9a422fa508796f8f350884422ab35a3615R5

@petersalomonsen
Copy link
Contributor

Seems to me also #83 could solve this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants