1
0
mirror of synced 2025-12-21 10:57:10 -05:00
Files
docs/middleware/trigger-error.js
Vanessa Yuen 3df90fc9b8 Hello git history spelunker!
Are you looking for something? Here is all of the GitHub Docs history in one single commit. Enjoy! 🎉
2020-09-27 14:10:11 +02:00

9 lines
297 B
JavaScript

// This module is for testing our handling of uncaught async rejections on incoming requests
module.exports = async function triggerError (req, res, next) {
// prevent this from being used in production
if (process.env.NODE_ENV === 'production') return next()
throw new Error('OH NOEZ')
}