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

Mutations util: Isolate callback errors via async function #1509

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

marcustyphoon
Copy link
Collaborator

@marcustyphoon marcustyphoon commented Jun 21, 2024

Description

One weird way to address #1508, rather than the eminently reasonable "two try-catches with console.log(error) in the catch block", is to run the relevant code in an async forEach. This means exceptions become rejected promises in the console and don't affect other loop iterations.

This also means that there is an async keyword which serves a purpose despite having no corresponding await, which is pretty terrible practice (I try to remove those!), especially uncommented.

Testing steps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant