Skip to content

Commit ea81376

Browse files
Copilotcwrau
andcommitted
fix: use errors.As instead of errors.Is for StatusError type check
Agent-Logs-Url: https://github.com/teutonet/cluster-api-provider-hosted-control-plane/sessions/ce70cb6f-e27f-47c5-8a59-9354683f31c0 Co-authored-by: cwrau <14326070+cwrau@users.noreply.github.com>
1 parent 5cbace8 commit ea81376

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

pkg/reconcilers/etcd_cluster/reconciler.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,8 @@ func (er *etcdClusterReconciler) etcdIsHealthy(
646646
}
647647

648648
func isTransientError(err error) bool {
649-
return !errors.Is(err, &apierrors.StatusError{})
649+
var statusErr *apierrors.StatusError
650+
return !errors.As(err, &statusErr)
650651
}
651652

652653
func (er *etcdClusterReconciler) createVolumeFromTemplate(

0 commit comments

Comments
 (0)