From 6c9b9ea30d2bf399f9116a8cf3743d5d49e6a8f7 Mon Sep 17 00:00:00 2001 From: mr Date: Mon, 23 Sep 2024 11:23:51 +0200 Subject: [PATCH] print to find bug --- models/peer/peer_cache.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/models/peer/peer_cache.go b/models/peer/peer_cache.go index 504137b..f4742c2 100644 --- a/models/peer/peer_cache.go +++ b/models/peer/peer_cache.go @@ -126,11 +126,10 @@ func (p *PeerCache) exec(url string, method tools.METHOD, body map[string]interf var m map[string]interface{} json.Unmarshal(b, &m) if err != nil { - fmt.Println("response", err) return err } - fmt.Println("response", m["error"]) - if e, ok := m["error"]; !ok && e != "" && e != "" { // Check if there is an error in the response + fmt.Println("response", m["error"], m["error"] != "") + if e, ok := m["error"]; ok && e != "" { // Check if there is an error in the response return errors.New(fmt.Sprintf("%v", m["error"])) } return nil