chore: add template name to error messages (#26259)
This commit is contained in:
parent
382af7a871
commit
f93b15a8c1
9 changed files with 35 additions and 10 deletions
|
|
@ -33,10 +33,8 @@ var _ api.Tariff = (*cachingProxy)(nil)
|
|||
// NewCachedFromConfig creates a proxy that controls tariff instantiation and caching
|
||||
func NewCachedFromConfig(ctx context.Context, typ string, other map[string]any) (api.Tariff, error) {
|
||||
tariffType := typ
|
||||
if typ == "template" {
|
||||
if template, ok := other["template"].(string); ok {
|
||||
tariffType = template
|
||||
}
|
||||
if template := util.TemplateName(typ, other); template != "" {
|
||||
tariffType = template
|
||||
}
|
||||
|
||||
p := &cachingProxy{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue