This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
"Intersection results could not be merged" does not mention the cause #3175
Labels
You can continue the conversation there. Go to discussion →
Zod is great and I'm enjoying the features around intersecting/merging objects. But for
.and
, when the intersections results can't be merged for some reason, the error message thrown at runtime doesn't provide any details.Not sure if this is a bug report or feature request, but: could the error message also include which field(s) are problematic?
Note that I'm not trying to report that the error is wrong. The error may be right - it just informative enough to explain why clearly.
Sorry that I'm not familiar enough with Zod to provide a standalone reproduction (I tried the Stackblitz Astro starter but couldn't get past TypeScript errors, amusingly). But here's how to get it on a real world project:
The text was updated successfully, but these errors were encountered: