Skip to content

Instantly share code, notes, and snippets.

@felipeplets
Created August 28, 2019 19:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save felipeplets/39eff46b3acb7fd558ea2f9994a72d9e to your computer and use it in GitHub Desktop.
Save felipeplets/39eff46b3acb7fd558ea2f9994a72d9e to your computer and use it in GitHub Desktop.
Error handling in JS promises
// Assuming I just want to console.log the error message
await promiseWillFail().catch((err) => console.log(err.message));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment