async function () {
try {
const response = await doAsyncOperation();
if (response.isError) {
throw new Error(response.isError)
}
return 'All good'
} catch (err) {
console.log(err);
return 'Error happened'
}
}
at process._tickCallback (internal/process/next_tick.js:68:7)
Find more questions by tags Asynchronous programmingJavaScript