consthandleError=fn=>{returnasync(req,res)=>{try{awaitfn(req,res)}catch(err){// perform your logic here...console.log(err.stack)}}}saba(handleError(async(req,res)=>{send(res,'ready')}))
Contributing
Fork it!
Create your feature branch: git checkout -b my-new-feature
Commit your changes: git commit -am 'Add some feature'
Push to the branch: git push origin my-new-feature