ZOD
I want the final response of the API to look something like this:
So the parent can be nullable, I define my schema like this:
When the parent is null, it gets returned null like normal, but when there is actually a parent, this is the fastify error I'm getting. Any idea on how to fix this?
3 Replies
posting the
userCore
definition would be helpful@sturlen userCore is just the email and name that were mentioned above. Here is the code:
if you can get the actual ZodError it should tell you exactly what it doesnt like