Take in Error object and automatically find message #29
Open
Description
Should be able to just pass an Error
object and automatically fetch the error message from the Error
object.
For example:
return next(new errors.BadRequestError(error));
Instead of (currently):
return next(new errors.BadRequestError(error.message));