Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[chore] Remove the top level error if it indicates an empty name (#9763)
This is a split of #9750 that tries to work around mapstructure, which wraps an error around a decoding error. In the case when an error is returned from a top level construct, we get a not so helpful message that says: ``` error decoding '': error running encode hook: marshaling error ``` With this change, the error is unwrapped, giving the following string representation: ``` error running encode hook: marshaling error ``` Because #9750 enforces going through mapstructure, it would change errors returned with this not-so-helpful preamble. Adding this removes the problem.
- Loading branch information