-
Notifications
You must be signed in to change notification settings - Fork 96
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
Mongoose ValidationError messages do not surface #116
Comments
You are not getting any additional information in the |
@jonjamz Do you have some samples about this specific issue who you can share with us to help you? |
@jonjamz what did you want to see? Are you referring to having more information in the server logs? The error details are there in the error object and get sent back to the client over JSON but we would likely need to update the feathers error handler to just spit out the attributes. Either that or register your own error handler. |
@ekryski yes it sounds like an update to the feathers error handler would do the trick. I would like to see whatever messaging is in the original error logged also on the server, as if it was never wrapped in anything else. This would make for a much nicer developer experience I think. |
@daffl I didn't check those properties at the time, but looking at the error handler code for this library it seems like all that information should be there in the error object. It would just be nice to see it on the server without any extra work. |
I think this is resolved. This is a pretty old issue and we have been seeing validation errors in production apps for quite a while. Closing. Please re-open if this is still relevant. |
I tried creating a user with an invalid field and the service gave me a FeathersError:
BadRequest: user validation failed
However, creating that user with the same invalid data using the Mongoose model directly yielded much more useful error messaging:
'avatar.files.img': { /avatar-placeholder.gif is not a valid URL! ...
Is there something specific that I can do to get these validation messages without having to manually use the model each time I encounter such an error?
The text was updated successfully, but these errors were encountered: