You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using mongoose model validation on embedded documents the error printed is in form of [object Object] (I guess because it's a nested error object for the sub-doc ?), How could I make sure it gets entirely serialized ?
// main document schemaconstuserSchema=newSchema({email: {type: String,required: true},password: {type: String,required: true},subDoc: [sub]});// sub document schemaconstsubDoc=newSchema({username: {type: String,}});
The text was updated successfully, but these errors were encountered:
I just verified that it sends the entire error. If you are just console.loging the error you might want to try console.log(JSON.stringify(error.toJSON())).
Hi,
using mongoose model validation on embedded documents the error printed is in form of
[object Object]
(I guess because it's a nested error object for the sub-doc ?), How could I make sure it gets entirely serialized ?The text was updated successfully, but these errors were encountered: