From 313149b72f33613c6bc6a8b8efbf05fac4dcc999 Mon Sep 17 00:00:00 2001 From: Johann Rudloff Date: Tue, 5 Jan 2021 19:10:12 +0100 Subject: [PATCH] Return empty list instead of 0 in error case --- src/metrics_handler.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/metrics_handler.erl b/src/metrics_handler.erl index d244bb2..9930bac 100644 --- a/src/metrics_handler.erl +++ b/src/metrics_handler.erl @@ -11,7 +11,7 @@ format_metric({Hostname, Port}) -> catch exit:Reason -> logger:error("failed to get status for ~p: Reason: ~p", [{Hostname, Port}, Reason]), - 0 + [] end, Valid = proplists:get_value(valid, Response, 0), Errors = proplists:get_value(errors, Response, 0), -- 2.45.2