diff --git a/models/peer/peer_cache.go b/models/peer/peer_cache.go index 7e4f44f..071fee4 100644 --- a/models/peer/peer_cache.go +++ b/models/peer/peer_cache.go @@ -125,13 +125,13 @@ func (p *PeerCache) exec(url string, method tools.METHOD, body map[string]interf } var m map[string]interface{} json.Unmarshal(b, &m) - fmt.Println("response", err) if err != nil { + fmt.Println("response", err) return err } 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 err + return nil } diff --git a/models/workflow/workflow_mongo_accessor.go b/models/workflow/workflow_mongo_accessor.go index 8fa1ea1..2927403 100644 --- a/models/workflow/workflow_mongo_accessor.go +++ b/models/workflow/workflow_mongo_accessor.go @@ -144,8 +144,8 @@ func (wfa *workflowMongoAccessor) book(id string, realData *Workflow, execs []*w ResourceID: dc_id, // set the datacenter id "WHERE" Executions: execs, // set the executions to book "WHAT" }).Serialize(), wfa.Caller) - fmt.Println("BOOKING", err) if err != nil { + fmt.Println("BOOKING", err) return err } }