Skip to content

Commit bf2b043

Browse files
nmarukovichhors
andauthored
K8SPG-781 add original error (#1207)
* K8SPG-781 add original error * K8SPG-781 add original error * K8SPG-781 add original error * fix PR comments --------- Co-authored-by: Viacheslav Sarzhan <slava.sarzhan@percona.com>
1 parent 33bfe69 commit bf2b043

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

percona/watcher/wal.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ func GetLatestCommitTimestamp(ctx context.Context, cli client.Client, execCli *c
167167

168168
primary, err := perconaPG.GetPrimaryPod(ctx, cli, cr)
169169
if err != nil {
170-
return nil, PrimaryPodNotFound
170+
return nil, errors.Wrap(PrimaryPodNotFound, err.Error())
171171
}
172172

173173
log.V(1).Info("Getting latest commit timestamp from primary pod", "pod", primary.Name)
@@ -203,7 +203,7 @@ func GetLatestCommitTimestamp(ctx context.Context, cli client.Client, execCli *c
203203
func getBackupStartTimestamp(ctx context.Context, cli client.Client, cr *pgv2.PerconaPGCluster, backup *pgv2.PerconaPGBackup) (time.Time, error) {
204204
primary, err := perconaPG.GetPrimaryPod(ctx, cli, cr)
205205
if err != nil {
206-
return time.Time{}, PrimaryPodNotFound
206+
return time.Time{}, errors.Wrap(PrimaryPodNotFound, err.Error())
207207
}
208208

209209
pgbackrestInfo, err := pgbackrest.GetInfo(ctx, primary, backup.Spec.RepoName)

0 commit comments

Comments
 (0)