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

Update mint.ts #243

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Update mint.ts #243

wants to merge 1 commit into from

Conversation

mdqst
Copy link

@mdqst mdqst commented Nov 5, 2024

Handling the Promise from main()

Themain() function is asynchronous, but you are calling it without handling its promise. If an error occurs within main(), it will be unhandled, leading to a crash. You should wrap the call to main() in a try-catch block or attach a .catch() to the promise:

Now, if an error occurs at any point in the main() function, it will be caught, and you will see an error message in the console. The script will exit with a code of 1, indicating that an error has occurred.

Now, if an error occurs at any point in the main() function, it will be caught, and you will see an error message in the console. The script will exit with a code of 1, indicating that an error has occurred.
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.

1 participant