Handling errors using middleware

suggest change
app.use(async (ctx, next) => {
  try {
    await next() // attempt to invoke the next middleware downstream
  } catch (err) {
    handleError(err, ctx) // define your own error handling function
  }
})

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents