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