From 9ef219b2543c3d4e0d484727ab2de4222f5575de Mon Sep 17 00:00:00 2001 From: minoplhy Date: Thu, 11 Apr 2024 00:27:57 +0700 Subject: [PATCH] fix: log error on Check_API_Key req --- src/handler/chibisafe.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/handler/chibisafe.go b/src/handler/chibisafe.go index fd3f56f..d48cea2 100644 --- a/src/handler/chibisafe.go +++ b/src/handler/chibisafe.go @@ -6,6 +6,8 @@ import ( "io" "net/http" "os" + + "github.com/rs/zerolog/log" ) func Check_API_Key(Basepath string, accessKey string) bool { @@ -20,6 +22,8 @@ func Check_API_Key(Basepath string, accessKey string) bool { } resp, err := HTTPNoData(GETStruct) if err != nil { + // Boolean is returned. So, no error was allowed to be returned + log.Error().Msg(err.Error()) return false } defer resp.Body.Close()