From 002fe023dee32d852afb41adb368f981b22cbfd3 Mon Sep 17 00:00:00 2001 From: Krzysztof Siedlecki Date: Wed, 20 Jan 2021 16:17:52 +0100 Subject: [PATCH] handling decoding error --- addon-resizer/nanny/kubernetes_client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addon-resizer/nanny/kubernetes_client.go b/addon-resizer/nanny/kubernetes_client.go index 27fc8950aaca..7c03526a9f60 100644 --- a/addon-resizer/nanny/kubernetes_client.go +++ b/addon-resizer/nanny/kubernetes_client.go @@ -96,7 +96,7 @@ func (k *kubernetesClient) countNodesThroughMetrics() (uint64, error) { if err == io.EOF { break } - continue + return 0, fmt.Errorf("decoding error: %v", err) } if !hasEqualValues(objectCountMetricName, mf.Name) {