- more error and warn output.
This commit is contained in:
@@ -48,7 +48,7 @@ func (o *OrderController) NewOrder(msg *elmapi.CallbackMsg, orderId string) *elm
|
||||
|
||||
created, _, err := db.ReadOrCreate(rec, "OrderId")
|
||||
if err != nil {
|
||||
globals.SugarLogger.Warnf("error when calling ReadOrCreate, error:%v", err)
|
||||
globals.SugarLogger.Warnf("error when calling ReadOrCreate, error:%v, rec:%v", err, rec)
|
||||
return errResponseDBError
|
||||
}
|
||||
if created || rec.Type != msg.Type {
|
||||
@@ -74,7 +74,7 @@ func (o *OrderController) OrderStatusChanged(msg *elmapi.CallbackMsg, orderId st
|
||||
|
||||
err := db.Read(rec, "OrderId")
|
||||
if err != nil {
|
||||
globals.SugarLogger.Warnf("error when calling ReadOrCreate, error:%v", err)
|
||||
globals.SugarLogger.Warnf("error when calling ReadOrCreate, error:%v, rec:%v", err, rec)
|
||||
} else {
|
||||
if rec.Type != msg.Type {
|
||||
err = globals2.FreshFoodAPI.ELMOrderStatus(orderId, msg.Type, utils.GetCurTimeStr())
|
||||
|
||||
Reference in New Issue
Block a user