From 4e05c9c83414623a64c56fdda306a4a93b811022 Mon Sep 17 00:00:00 2001 From: vsoch Date: Mon, 20 May 2024 13:04:06 -0600 Subject: [PATCH] grabdb init: ensure that error returned is checked Problem: calling the graphdb.Init returns an error but we are not checking it. Solution: check it Signed-off-by: vsoch --- pkg/server/server.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/server/server.go b/pkg/server/server.go index 476f8d7..53a717e 100644 --- a/pkg/server/server.go +++ b/pkg/server/server.go @@ -85,7 +85,10 @@ func NewServer( } // Run init with any options from the config, and the match algorithm - graphDB.Init(cfg.GraphDatabase.Options) + err = graphDB.Init(cfg.GraphDatabase.Options) + if err != nil { + log.Fatal(err) + } log.Printf("🧩️ graph database: %v", graphDB.Name()) // init the database, creating jobs and clusters tables