From 3796ef5e543ada3d0a117c6ca1d626e63d37a74c Mon Sep 17 00:00:00 2001 From: Lam Tran Date: Tue, 23 Apr 2024 20:10:34 +0700 Subject: [PATCH] fix(productcatalogservice): handle err returned from openfeature.SetProvider func (#1535) Co-authored-by: Pierre Tessier --- 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) }