From 2aa8b1539e74ba6e8601946257ca0b36b87eac03 Mon Sep 17 00:00:00 2001 From: andig Date: Mon, 4 Nov 2024 10:15:18 +0100 Subject: [PATCH] chore: clean error handling --- provider/getter.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/provider/getter.go b/provider/getter.go index 5ec6f38ee3..17b1394f05 100644 --- a/provider/getter.go +++ b/provider/getter.go @@ -47,7 +47,11 @@ func (p *getter) IntGetter() (func() (int64, error), error) { return func() (int64, error) { f, err := g() - return int64(f), err + if err != nil { + return 0, err + } + + return int64(f), nil }, err }