TabuRei
TabuRei copied to clipboard
Error Handling
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.
I would like to work on this issue but first i need some specific problems to work on, can someone please elaborate?
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.
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: