DEV Community

Discussion on: Build a Javascript async function error handler

Collapse
 
josephakayesi profile image
JosephAkayesi • Edited

Can I pass a custom error object to the asyncHandler from with the '/item' route

Collapse
 
natelindev profile image
Nathaniel

Sure, you can throw custom error, and handle it in asyncHandler, just make sure you have a way to identify it.