From 59a5456091b93ac026e0a3e9bc1e9e6d557bf330 Mon Sep 17 00:00:00 2001 From: Poorna Date: Tue, 21 Feb 2023 20:27:48 -0800 Subject: [PATCH] fix: STS error translation to API error (#16683) --- cmd/sts-errors.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/sts-errors.go b/cmd/sts-errors.go index f620a73cd..011a3d00d 100644 --- a/cmd/sts-errors.go +++ b/cmd/sts-errors.go @@ -33,7 +33,7 @@ func writeSTSErrorResponse(ctx context.Context, w http.ResponseWriter, isErrCode err = stsErrCodes.ToSTSErr(errCode) } if err.Code == "InternalError" || !isErrCodeSTS { - aerr := getAPIError(APIErrorCode(errCode)) + aerr := errorCodes.ToAPIErr(toAPIErrorCode(ctx, errCtxt)) if aerr.Code != "InternalError" { err.Code = aerr.Code err.Description = aerr.Description