TabuRei icon indicating copy to clipboard operation
TabuRei copied to clipboard

Error Handling

Open daemon1024 opened this issue 4 years ago • 3 comments

We are attempting to fix out the errors wherever encountered, but whenever there are errors there is a potential chance of crashes.

We can potentially minimize this by putting most of the content inside try catch block as well as validating data and props before passing down the function.

daemon1024 avatar Mar 04 '21 16:03 daemon1024

I would like to work on this issue but first i need some specific problems to work on, can someone please elaborate?

sambhavsaxena avatar Dec 11 '21 12:12 sambhavsaxena

Hey @sambhavsaxena , We are currently discussing on our discord what all specificity we should handle. If you wanna join us in the discussion, feel free to. Rest I will get back to you seen detailing out things more.

Thanks a lot for the interest.

daemon1024 avatar Dec 11 '21 15:12 daemon1024

So we use a lot of promise based execution in our code Some instances like https://github.com/osdc/TabuRei/blob/66afb2bb5542461e534ad3e9782f4c5b3775320f/js/importTabs.js#L18 https://github.com/osdc/TabuRei/blob/66afb2bb5542461e534ad3e9782f4c5b3775320f/js/exportTabs.js#L2 https://github.com/osdc/TabuRei/blob/66afb2bb5542461e534ad3e9782f4c5b3775320f/js/popup.js#L122 and similarly a lot of other instances.

We should either put them inside try catch blocks or use .catch() directive after .then(). Ref https://javascript.info/promise-error-handling https://javascript.info/async-await#error-handling

This way we will properly log errors instead of crashing out.

Hope this clarifies things out. Feel free to reach out :v:

daemon1024 avatar Dec 13 '21 16:12 daemon1024