Skip to content

ljjkerwin/async-catch-middleware

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

A middleware for wrapping the other middleware to catch the error of the async function in expressjs

const asyncCatch = require('async-catch-middleware');

app.use(asyncCatch(async function () {

  // do something

  throw Error('some error');

  // then the error would be passed to the next() function in the middleware
}))

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published