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

How can I catch the event exception? #185

Closed
zhaozhiming opened this issue May 29, 2018 · 3 comments
Closed

How can I catch the event exception? #185

zhaozhiming opened this issue May 29, 2018 · 3 comments
Labels
discussion Questions, feedback and general information.

Comments

@zhaozhiming
Copy link

Hi, I use the provider event to monitoring the wallet's balance.

prototype.on( eventType , callback )
Register a callback for any future eventType; see below for callback parameters

But sometimes since the network I get the Unhandled promise rejection: Error: Request failed with status code 403 error.
How can I catch the error in the event ? Thanks.

@ricmoo
Copy link
Member

ricmoo commented May 31, 2018

I've seen another issue with this as well and will look for the culprit.

It shouldn't matter too much though. I've noticed that browsers aren't as adept at realizing a promise that is actually caught at a higher level in the promise stack is handled.

@ricmoo ricmoo added the discussion Questions, feedback and general information. label May 31, 2018
@ricmoo
Copy link
Member

ricmoo commented Apr 4, 2020

Have you had this problem in v5? In v5 I've moved to using the TypeScript async/await more, which should help prevent these sorts of issues.

@ricmoo
Copy link
Member

ricmoo commented Jun 3, 2020

I think this is stale, so I'm going to close it. If you still have issues though, please re-open or create a new issue.

Thanks! :)

@ricmoo ricmoo closed this as completed Jun 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Questions, feedback and general information.
Projects
None yet
Development

No branches or pull requests

2 participants