Home >> Tutorials >> Node.js Async Await: Error Handling

Node.js Error Handling

Q:- How to handle error/exception with Async/Await in Node.js?

Using async/await, you still need to catch errors.

async function someFunction() {
  try {
    await someOtherFunction()
  }
  catch (err) {
    console.error(err.message)
  }
}
Full Stack Tutorials

Author @FullStackTutorials | View all Articles