print to find bug

This commit is contained in:
mr 2024-09-23 10:34:08 +02:00
parent 4f798263b1
commit 610eb0cfda
2 changed files with 3 additions and 3 deletions

View File

@ -125,13 +125,13 @@ func (p *PeerCache) exec(url string, method tools.METHOD, body map[string]interf
} }
var m map[string]interface{} var m map[string]interface{}
json.Unmarshal(b, &m) json.Unmarshal(b, &m)
fmt.Println("response", err)
if err != nil { if err != nil {
fmt.Println("response", err)
return err return err
} }
if e, ok := m["error"]; !ok && e != "" { // Check if there is an error in the response 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 errors.New(fmt.Sprintf("%v", m["error"]))
} }
return err return nil
} }

View File

@ -144,8 +144,8 @@ func (wfa *workflowMongoAccessor) book(id string, realData *Workflow, execs []*w
ResourceID: dc_id, // set the datacenter id "WHERE" ResourceID: dc_id, // set the datacenter id "WHERE"
Executions: execs, // set the executions to book "WHAT" Executions: execs, // set the executions to book "WHAT"
}).Serialize(), wfa.Caller) }).Serialize(), wfa.Caller)
fmt.Println("BOOKING", err)
if err != nil { if err != nil {
fmt.Println("BOOKING", err)
return err return err
} }
} }