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
|
|
@ -5,6 +5,7 @@ import (
|
|||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/evcc-io/evcc/util"
|
||||
"golang.org/x/oauth2"
|
||||
)
|
||||
|
||||
|
|
@ -17,7 +18,7 @@ func NewFromConfig(ctx context.Context, typ string, other map[string]any) (oauth
|
|||
|
||||
v, err := factory(ctx, other)
|
||||
if err != nil {
|
||||
err = fmt.Errorf("cannot create auth type '%s': %w", typ, err)
|
||||
err = fmt.Errorf("cannot create auth type '%s': %w", util.TypeWithTemplateName(typ, other), err)
|
||||
}
|
||||
|
||||
return v, err
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue