It surprises me that the creator of Zod, which embeds native errors in Zod’s error result type, would agree to omit them here. Returning native errors in result objects gives the benefit of both the explicit error handling of strongly typed FP languages and the call stack and nested causes of native JavaScript.
It surprises me that the creator of Zod, which embeds native errors in Zod’s error result type, would agree to omit them here. Returning native errors in result objects gives the benefit of both the explicit error handling of strongly typed FP languages and the call stack and nested causes of native JavaScript.