js icon indicating copy to clipboard operation
js copied to clipboard

Is there a list of all the exceptions thrown ? Errors management

Open 0xbuidler opened this issue 10 months ago • 1 comments

My problem is that I'm catching errors on Thirdweb's functions with a Try/Catch but I need to ensure that what I'm doing will last in the long term and i'm looking for something better than matching an error.message with a pre-defined string.

For instance, when requesting a user to sign in with signLoginPayload and the wallet popup opens, if the user closes it / cancel the process, it just throw User rejected the request. But the name is undefined, the cause is undefined too.

On top of that, what else can be thrown ?

The reason behind this issue is that it's useful to know which exceptions is being thrown in order to send it to Sentry or not. For instance, if a user just rejected the request, it's pretty unnecessary for me to send it to Sentry.

How can I do that in a better and more sustainable way ?

0xbuidler avatar Feb 11 '25 14:02 0xbuidler

This issue has been inactive for 7 days. It is now marked as stale and will be closed in 2 days if no further activity occurs.

github-actions[bot] avatar Feb 21 '25 01:02 github-actions[bot]

Re-Open pls

0xbuidler avatar Feb 23 '25 02:02 0xbuidler