From 96fb582125561f3e6d6f1b45c76751cbcf1b8f43 Mon Sep 17 00:00:00 2001 From: Vishwanath Hiremath <100623239+vishwahiremat@users.noreply.github.com> Date: Tue, 10 Sep 2024 16:51:14 -0700 Subject: [PATCH] Remove the error message added for debugging. (#7913) # Description Remove the error message added for debugging. ## Type of change - This pull request fixes a bug in Radius and has an approved issue (issue link required). - This pull request adds or changes features of Radius and has an approved issue (issue link required). - This pull request is a minor refactor, code cleanup, test improvement, or other maintenance task and doesn't change the functionality of Radius (issue link optional). Fixes: #issue_number Signed-off-by: Vishwanath Hiremath --- pkg/rp/util/authclient/awsirsa.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/rp/util/authclient/awsirsa.go b/pkg/rp/util/authclient/awsirsa.go index f3546560d3..fb4d8d4169 100644 --- a/pkg/rp/util/authclient/awsirsa.go +++ b/pkg/rp/util/authclient/awsirsa.go @@ -19,7 +19,6 @@ package authclient import ( "context" "encoding/base64" - "errors" "fmt" "strings" @@ -59,10 +58,10 @@ func (b *awsIRSA) GetAuthClient(ctx context.Context, templatePath string) (remot return nil, err } - awscfg, err := config.LoadDefaultConfig(context.TODO(), + awscfg, err := config.LoadDefaultConfig(ctx, config.WithRegion(region)) if err != nil { - return nil, errors.New("first error : " + err.Error()) + return nil, fmt.Errorf("failed to load configuration: %w", err) } // Create a credentials cache using the Web Identity Role Provider for AWS STS.