From d0775934520472770118b9e7ad1ab43bb310f3ab Mon Sep 17 00:00:00 2001 From: Andy Lo-A-Foe Date: Thu, 3 Oct 2024 13:42:45 +0200 Subject: [PATCH] Give few more details in authentication error condition Signed-off-by: Andy Lo-A-Foe --- internal/config/config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/config/config.go b/internal/config/config.go index 423d758c..99cd37f0 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -402,7 +402,7 @@ func (c *Config) SetupIAMClient() { PrivateKey: c.ServicePrivateKey, }) if err != nil { - c.iamClientErr = fmt.Errorf("invalid IAM Service Identity credentials: %w", err) + c.iamClientErr = fmt.Errorf("invalid IAM Service Identity credentials for '%s': %w", c.ServiceID, err) return } usingServiceIdentity = true @@ -415,7 +415,7 @@ func (c *Config) SetupIAMClient() { } err = client.Login(c.OrgAdminUsername, c.OrgAdminPassword) if err != nil { - c.iamClientErr = fmt.Errorf("invalid IAM Org Admin credentials: %w", err) + c.iamClientErr = fmt.Errorf("invalid IAM Org Admin credentials for '%s': %w", c.OrgAdminUsername, err) return } usingOrgAdmin = true