swagger-node icon indicating copy to clipboard operation
swagger-node copied to clipboard

Handling unhandled promise rejection with async

Open serratedserenade opened this issue 7 years ago • 0 comments

Does anyone know how to do this? At the moment I have:

async function promiseTest(req, res) {
  throw new ResError(501, 'Nope');
}

And I can't seem to find how and where to handle when an error is thrown from within the Promise.

serratedserenade avatar Jul 18 '17 07:07 serratedserenade