Skip to content

Instantly share code, notes, and snippets.

@apaleslimghost
Created January 12, 2017 23:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save apaleslimghost/83f56764aec2ebfadebb0abcc26f8be9 to your computer and use it in GitHub Desktop.
Save apaleslimghost/83f56764aec2ebfadebb0abcc26f8be9 to your computer and use it in GitHub Desktop.
const finalhandler = require('finalhandler');
module.exports = fn => (req, res) => {
fn(req, res).catch(finalhandler(req, res));
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment