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

Add error handling to examples - Part 1 #773

Closed

Conversation

laviniat1996
Copy link

@laviniat1996 laviniat1996 commented Jul 5, 2023

This PR adds error handling to admin, auth and avm examples.

Because of no error handling, the user would get unhandled errors:

[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "#<Object>".] {
  code: 'ERR_UNHANDLED_REJECTION'
}

With the addition of error handling, the user gets a much specific error, thus knowing that the script did run, but there's a problem within the script setup:

Error. Please check if all the parameters are configured correctly.

@laviniat1996 laviniat1996 changed the title Add error handling to examples Add error handling to examples - Part 1 Jul 5, 2023
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