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

Error Handling #30

Open
daemon1024 opened this issue Mar 4, 2021 · 3 comments
Open

Error Handling #30

daemon1024 opened this issue Mar 4, 2021 · 3 comments
Assignees
Labels
enhancement New feature or request
Projects

Comments

@daemon1024
Copy link
Member

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 daemon1024 created this issue from a note in v1.0 (To do) Mar 4, 2021
@akshgpt7 akshgpt7 added the enhancement New feature or request label Mar 4, 2021
@sambhavsaxena
Copy link

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

@daemon1024
Copy link
Member Author

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
Copy link
Member Author

So we use a lot of promise based execution in our code
Some instances like

await storeTabs(grouplist, []);

return browser.storage.local.get(null).then((localStore) => {

Promise.resolve(creating);

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 ✌️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
v1.0
To do
Development

No branches or pull requests

3 participants