From cecbc44ae2dcb4c9cb538d2438e78310779c48c8 Mon Sep 17 00:00:00 2001 From: Valeri Karpov Date: Sun, 5 May 2024 15:17:12 -0400 Subject: [PATCH] fix(error): remove model property from CastError to avoid printing all model properties to console Fix #14529 --- lib/error/cast.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/error/cast.js b/lib/error/cast.js index f7df49b8c7e..115927117f7 100644 --- a/lib/error/cast.js +++ b/lib/error/cast.js @@ -75,7 +75,6 @@ class CastError extends MongooseError { * ignore */ setModel(model) { - this.model = model; this.message = formatMessage(model, this.kind, this.value, this.path, this.messageFormat, this.valueType); }