Skip to content

Commit 2dba52d

Browse files
committed
Hide error generation from stack trace
1 parent 375fa0f commit 2dba52d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/errors/validation/validation-error.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ class ValidationError extends Error {
66
const id = instance.id;
77
super(getMessage(message, modelName, id));
88
Object.assign(this, { instance, id, modelName });
9+
Error.captureStackTrace(this, this.constructor);
910
}
1011
}
1112

0 commit comments

Comments
 (0)