fix: expose shopee sync failure reason
This commit is contained in:
@@ -94,11 +94,11 @@ func (e ShopeeProduct) getByShopeeID(c *gin.Context, requireAPIKey bool) {
|
||||
return
|
||||
}
|
||||
if _, err := client.SyncShopProduct(c.Request.Context(), *record); err != nil {
|
||||
e.Error(502, err, "Shopee 商品同步失败")
|
||||
e.Error(502, err, "Shopee 商品同步失败:"+err.Error())
|
||||
return
|
||||
}
|
||||
if _, err := client.WaitForProductSync(c.Request.Context(), record.ID, time.Second); err != nil {
|
||||
e.Error(502, err, "Shopee 商品同步失败")
|
||||
e.Error(502, err, "Shopee 商品同步失败:"+err.Error())
|
||||
return
|
||||
}
|
||||
// The sync task updates the ERP asynchronously. Locate the record again so
|
||||
|
||||
Reference in New Issue
Block a user