Does restify support catching errors from promises? For example, I'm using babel and async/await functions so most of my middleware functions end up looking like the following:
Server.get('/route', async function (req, res, next) {
throw new Error('Yikes!')
})
This roughly translates to the following ES5 code:
Server.get('/route', function (req, res, next) {
return new Promise(function (resolve, reject) {
reject(new Error('Yikes!'))
})
})
Does restify catch these errors and output them to the client?
Does restify support catching errors from promises? For example, I'm using babel and async/await functions so most of my middleware functions end up looking like the following:
This roughly translates to the following ES5 code:
Does restify catch these errors and output them to the client?