Skip to content

Commit 1ca7d5a

Browse files
committed
Refresh auth context while polling for clustergroup backupschedule
1 parent db5c3cd commit 1ca7d5a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

internal/resources/backupschedule/resource_backup_schedule.go

+5
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,11 @@ func readCGResourceWait(ctx context.Context, config *authctx.TanzuContext,
507507
resourceFullName)
508508

509509
if err != nil || resp == nil || resp.Schedule == nil {
510+
if clienterrors.IsUnauthorizedError(err) {
511+
authctx.RefreshUserAuthContext(config, clienterrors.IsUnauthorizedError, err)
512+
continue
513+
}
514+
510515
return nil, err
511516
}
512517

0 commit comments

Comments
 (0)