-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
breaking changesChange that can breaking existing codeChange that can breaking existing codebugBug or defectBug or defect
Milestone
Description
Joi inherits from the Error object and returns this, thus passing an instanceof check, but the returned object does not appear to behave like an Error proper. This might be some internal stuff in V8, I don't know.
Most significantly, there is no stack trace attached. It would be super nice if, instead of using util.inherits() and Error.call(), Joi instead created an actual Error object and attached its properties to it. This would return an Error object with a .stack property and all the rest without producing a nonconformant Error object.
Metadata
Metadata
Assignees
Labels
breaking changesChange that can breaking existing codeChange that can breaking existing codebugBug or defectBug or defect