From 128fdbfffa45be40fbcd30c3274833dfc3ebbff5 Mon Sep 17 00:00:00 2001 From: 131 <11222509+Netrvin@users.noreply.github.com> Date: Thu, 17 Jul 2025 21:48:21 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E9=98=BF=E9=87=8C=E4=BA=91ESA?= =?UTF-8?q?=E6=B5=B7=E5=A4=96=E5=8C=BA=E8=AF=81=E4=B9=A6=E9=83=A8=E7=BD=B2?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/core/ssl-deployer/providers/aliyun-esa/aliyun_esa.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkg/core/ssl-deployer/providers/aliyun-esa/aliyun_esa.go b/pkg/core/ssl-deployer/providers/aliyun-esa/aliyun_esa.go index bcaae6ca1..48e55881a 100644 --- a/pkg/core/ssl-deployer/providers/aliyun-esa/aliyun_esa.go +++ b/pkg/core/ssl-deployer/providers/aliyun-esa/aliyun_esa.go @@ -100,10 +100,17 @@ func (d *SSLDeployerProvider) Deploy(ctx context.Context, certPEM string, privke SiteId: tea.Int64(d.config.SiteId), Type: tea.String("cas"), CasId: tea.Int64(certId), + Region: tea.String(d.config.Region), } setCertificateResp, err := d.sdkClient.SetCertificate(setCertificateReq) d.logger.Debug("sdk request 'esa.SetCertificate'", slog.Any("request", setCertificateReq), slog.Any("response", setCertificateResp)) if err != nil { + var sdkError *tea.SDKError + if errors.As(err, &sdkError) { + if *sdkError.Code == "Certificate.Duplicated" { + return &core.SSLDeployResult{}, nil + } + } return nil, fmt.Errorf("failed to execute sdk request 'esa.SetCertificate': %w", err) } From eee58168491ad75478b7eafe1ab3c0f535bfe553 Mon Sep 17 00:00:00 2001 From: 131 <11222509+Netrvin@users.noreply.github.com> Date: Fri, 18 Jul 2025 19:15:39 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E9=98=BF=E9=87=8C=E4=BA=91ESA?= =?UTF-8?q?=E6=B5=B7=E5=A4=96=E5=8C=BA=E8=AF=81=E4=B9=A6=E9=83=A8=E7=BD=B2?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/core/ssl-deployer/providers/aliyun-esa/aliyun_esa.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/core/ssl-deployer/providers/aliyun-esa/aliyun_esa.go b/pkg/core/ssl-deployer/providers/aliyun-esa/aliyun_esa.go index 48e55881a..f2afa2228 100644 --- a/pkg/core/ssl-deployer/providers/aliyun-esa/aliyun_esa.go +++ b/pkg/core/ssl-deployer/providers/aliyun-esa/aliyun_esa.go @@ -107,7 +107,7 @@ func (d *SSLDeployerProvider) Deploy(ctx context.Context, certPEM string, privke if err != nil { var sdkError *tea.SDKError if errors.As(err, &sdkError) { - if *sdkError.Code == "Certificate.Duplicated" { + if tea.StringValue(sdkError.Code) == "Certificate.Duplicated" { return &core.SSLDeployResult{}, nil } }