Skip to content

Commit 2cecc0b

Browse files
committed
fix error message
1 parent cb789bb commit 2cecc0b

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

internal/controller/postgrescluster/pgbackrest.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1689,8 +1689,12 @@ func (r *Reconciler) reconcilePostgresClusterDataSource(ctx context.Context,
16891689
client.ObjectKey{Name: sourceClusterName, Namespace: sourceClusterNamespace},
16901690
sourceCluster); err != nil {
16911691
if apierrors.IsNotFound(err) {
1692-
log.Error(errors.New("DataSource refers to a non-existent PostgresCluster"),
1693-
"name", sourceClusterName, "namespace", sourceClusterNamespace)
1692+
log.Error(
1693+
errors.New("DataSource refers to a non-existent PostgresCluster"),
1694+
"failed to fetch source cluster",
1695+
"name", sourceClusterName,
1696+
"namespace", sourceClusterNamespace,
1697+
)
16941698
r.Recorder.Eventf(cluster, corev1.EventTypeWarning, "InvalidDataSource",
16951699
"PostgresCluster %q does not exist", sourceClusterName)
16961700
return nil

0 commit comments

Comments
 (0)