-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to surface custom CastError messages? #4113
Comments
This is similar to, if not the same issue as #3162. |
Right now a CastError has a |
@vkarpov15 thanks for looking at this. I've changed to using |
You can also just use your own error type, a casterror gets surfaced in the end anyway |
Thanks for the tip!
|
We're working on mongoose-geojson-schema, which adds validation for GeoJSON objects to Mongoose schemas. Following the guidance on creating a Custom Schema Type in the mongoose docs we're using
referenced here
Yet when we test the code and review the exceptions thrown, they are generic messages:
How can the user find out the detailed error message? Is there something else that we need to in the plugin, or something else the user does on the calling side?
Thanks in advance for any help here.
The text was updated successfully, but these errors were encountered: