catch add trsuted domain error
[ZITADOPER-07]
This commit is contained in:
@@ -512,7 +512,9 @@ func (r *ZitadelClusterReconciler) reconcileSMTPConfig(ctx context.Context, zita
|
||||
Domain: strings.Split(zitadel.Spec.SMTPConfig.SenderAddress, "@")[1],
|
||||
})
|
||||
if err != nil {
|
||||
return ctrl.Result{}, err
|
||||
if !strings.Contains(err.Error(), "AlreadyExists") {
|
||||
return ctrl.Result{}, fmt.Errorf("Could add smtp trusted domain: %v", err)
|
||||
}
|
||||
}
|
||||
var smtpId string
|
||||
resp, err := adminClient.GetSMTPConfig(ctx, &adm.GetSMTPConfigRequest{})
|
||||
@@ -600,7 +602,7 @@ func (r *ZitadelClusterReconciler) reconcileDomainPolicy(ctx context.Context, zi
|
||||
ValidateOrgDomains: zitadel.Spec.DomainSettings.ValidateOrgDomains,
|
||||
SmtpSenderAddressMatchesInstanceDomain: zitadel.Spec.DomainSettings.SMTPSenderAddressMatchesInstanceDomain,
|
||||
}); err != nil {
|
||||
if !strings.Contains(err.Error(), "AlreadyExists") {
|
||||
if !strings.Contains(err.Error(), "not been changed") {
|
||||
return ctrl.Result{}, fmt.Errorf("Could not update domain policy config: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user