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] =?UTF-8?q?fix:=20=E9=98=BF=E9=87=8C=E4=BA=91ESA=E6=B5=B7?= =?UTF-8?q?=E5=A4=96=E5=8C=BA=E8=AF=81=E4=B9=A6=E9=83=A8=E7=BD=B2=E5=A4=B1?= =?UTF-8?q?=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) }