From what I read from the source code, the errors can actually be a string or an array of strings, which I found very odd from a consumer perspective.
I would suggest to normalize this to always be an array of Error instances. Unlike strings, error instances gives more information about the actual error. For instance, we can get a stack trace from it if necessary.
If you guys agree with this, I will make a PR with these changes. This is an API change which translates in a major release bump.
From what I read from the source code, the
errors
can actually be a string or an array of strings, which I found very odd from a consumer perspective.I would suggest to normalize this to always be an array of
Error
instances. Unlike strings, error instances gives more information about the actual error. For instance, we can get a stack trace from it if necessary.If you guys agree with this, I will make a PR with these changes. This is an API change which translates in a major release bump.