From 916af9b890b927333ecbdd0975fc56d98906870c Mon Sep 17 00:00:00 2001 From: Lam Tran Date: Wed, 17 Apr 2024 15:06:24 +0700 Subject: [PATCH] fix(productcatalogservice): handle err returned from openfeature.SetProvider func --- src/productcatalogservice/main.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/productcatalogservice/main.go b/src/productcatalogservice/main.go index a442a1729f..2330212d79 100644 --- a/src/productcatalogservice/main.go +++ b/src/productcatalogservice/main.go @@ -128,9 +128,12 @@ func main() { } log.Println("Shutdown meter provider") }() - openfeature.SetProvider(flagd.NewProvider()) + err := openfeature.SetProvider(flagd.NewProvider()) + if err != nil { + log.Fatal(err) + } - err := runtime.Start(runtime.WithMinimumReadMemStatsInterval(time.Second)) + err = runtime.Start(runtime.WithMinimumReadMemStatsInterval(time.Second)) if err != nil { log.Fatal(err) }