chore: return config error on invalid yaml template keys (#11394)
This commit is contained in:
parent
c248f90b5d
commit
3260ce65c8
2 changed files with 5 additions and 1 deletions
|
|
@ -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()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue