add error message for AsYAML

This commit is contained in:
Donny Xia
2021-01-20 10:40:59 -08:00
parent d28ce28130
commit ffed8f1430

View File

@@ -274,7 +274,7 @@ func (m *resWrangler) AsYaml() ([]byte, error) {
for _, res := range m.Resources() {
out, err := yaml.Marshal(res.Map())
if err != nil {
return nil, err
return nil, errors.Wrapf(err, "%#v", res.Map())
}
if firstObj {
firstObj = false