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
Despite using mongoose.Error() when I use the Schema Types in another project I get this:
Unhandled rejection ValidationError: CastError: Cast to Point failed for value "[object Object]" at path "loc"
and no 'reason' which is less than helpful since I can't see why my object is not passing. Building a custom error seems unnecessarily onerous (Automattic/mongoose#4113).
Ugh. I'm not sure what to do here. It seems like a might be an ordering issue, like the CastError is being thrown before the custom error. At this point I would resort to reading the Mongoose code and tracing the flow of what's happening.
I've opened a new Mongoose issue requesting the option to disable type casting. Saw several of your issues that might be more easily handled if this were an option.
Despite using
mongoose.Error()
when I use the Schema Types in another project I get this:and no 'reason' which is less than helpful since I can't see why my object is not passing. Building a custom error seems unnecessarily onerous (Automattic/mongoose#4113).
Thoughts @markstos ?
The text was updated successfully, but these errors were encountered: