chore: return config error on invalid yaml template keys (#11394)

This commit is contained in:
andig 2024-01-01 13:38:25 +01:00 • committed by GitHub
parent c248f90b5d
commit 3260ce65c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View file

@ -43,6 +43,10 @@ type ConfigError struct {
err error
}
func NewConfigError(err error) error {
return &ConfigError{err}
}
func (e *ConfigError) Error() string {
return e.err.Error()
}

View file

@ -32,7 +32,7 @@ func RenderInstance(class Class, other map[string]interface{}) (*Instance, error
b, _, err := tmpl.RenderResult(TemplateRenderModeInstance, other)
if err != nil {
return nil, err
return nil, util.NewConfigError(err)
}
var instance Instance