Q. Which middleware handles errors?

A
express.error()
B
app.use((err, req, res, next))
C
express.catch()
D
app.error()
Solution:

app.use((err, req, res, next)) defines an error-handling middleware.

Entri PDF Icon

Get Question Bank

Strengthen Your Practice with our comprehensive question bank.

Entri Contact Image

Get Expert Advice for Free: Register for Your Free Consultation Now!