node package manager

error-throwing-middleware

Install

npm i -S error-throwing-middleware

Use

var thrower = require('error-throwing-middleware');
app.use(thrower);

Now you randomly get errors! :)