Skip to content
This repository has been archived by the owner on Aug 10, 2023. It is now read-only.

[fix] Add more context to config parsing error message #34

Merged
merged 1 commit into from
Oct 21, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add more context to error message
edulop committed Oct 21, 2019
commit b15c5f2904eee376b8253f34057443b355d9fd6a
2 changes: 1 addition & 1 deletion pkg/config/config.go
Original file line number Diff line number Diff line change
@@ -218,7 +218,7 @@ func validate(m map[string]string, keys ...string) error {
errs = multierror.Append(errs, errors.New(fmt.Sprintf("missing %s", k)))
}
}
return errs.ErrorOrNil()
return errors.Wrapf(errs.ErrorOrNil(), "config %#v missing keys", m)
}

func (secret *Secret) UnmarshalYAML(unmarshal func(interface{}) error) error {