Skip to content

Commit 9147984

Browse files
committed
add more logs
1 parent c7bb273 commit 9147984

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

internal/controlplane/controlplane.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,15 @@ func (d *dashboardClient) Update(ctx context.Context, tctx *translator.Translate
7373
oldssl, err := d.c.Cluster(name).SSL().Get(ctx, ssl.Cert)
7474
if err != nil || oldssl == nil {
7575
if _, err := d.c.Cluster(name).SSL().Create(ctx, ssl); err != nil {
76-
byt, _ := json.Marshal(ssl)
77-
return fmt.Errorf("failed to create ssl: %s: %w", string(byt), err)
76+
byt, _ := json.Marshal(ssl.Snis)
77+
return fmt.Errorf("failed to create ssl with sni: %s: %w", string(byt), err)
7878
}
7979
} else {
8080
// array union is done to avoid host duplication
8181
ssl.Snis = arrayUnion(ssl.Snis, oldssl.Snis)
8282
if _, err := d.c.Cluster(name).SSL().Update(ctx, ssl); err != nil {
83-
byt, _ := json.Marshal(ssl)
84-
return fmt.Errorf("failed to update ssl: %s: %w", string(byt), err)
83+
byt, _ := json.Marshal(ssl.Snis)
84+
return fmt.Errorf("failed to update ssl with sni: %s: %w", string(byt), err)
8585
}
8686
}
8787
}

0 commit comments

Comments
 (0)