Closed ardan-bkennedy closed 8 months ago
When designing v2, we talked about having a mode where we continue parsing as far as possible and collect up the errors, but didn't have a good API to collect up the errors. At the time errors.Join
and the implicit interface{ Unwrap() []error }
interface did not exist, so the calculus is different today. We decided back then that failing early on the first error was still the right default with the intention of eventually providing this ability.
For past discussion: https://youtu.be/tfWn54N6uwc?feature=shared&t=922
Ok cool. Thanks for getting back to me so quickly.
Is there a way to extract multiple errors from an unmarshal operation?
The value for both id and role are not compliant with the type. Is there a way to get back that information instead of the first field that fails?