print to find bug

This commit is contained in:
mr 2024-09-23 10:59:19 +02:00
parent 610eb0cfda
commit a4374602e1

View File

@ -129,8 +129,8 @@ func (p *PeerCache) exec(url string, method tools.METHOD, body map[string]interf
fmt.Println("response", err) fmt.Println("response", err)
return err return err
} }
fmt.Println("response", m["error"])
if e, ok := m["error"]; !ok && e != "" { // Check if there is an error in the response if e, ok := m["error"]; !ok && e != "" && e != "<nil>" { // Check if there is an error in the response
return errors.New(fmt.Sprintf("%v", m["error"])) return errors.New(fmt.Sprintf("%v", m["error"]))
} }
return nil return nil