From 329bbc5d5bb2a002ca995020ff669b5cbb6efadf Mon Sep 17 00:00:00 2001 From: andig Date: Thu, 29 Dec 2022 11:34:22 +0100 Subject: [PATCH] chore: avoid panic --- tariff/fixed.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tariff/fixed.go b/tariff/fixed.go index b4e3d9ba8..d7b37abf5 100644 --- a/tariff/fixed.go +++ b/tariff/fixed.go @@ -103,7 +103,7 @@ func (t *Fixed) Rates() (api.Rates, error) { } if zone == nil { - panic("could not find zone") + return nil, fmt.Errorf("could not find zone for %02d:%02d", m.Hour, m.Min) } // end rate at end of day or next marker