fix: expose shopee sync failure reason

This commit is contained in:
QiuSW
2026-09-14 09:08:20 +08:00
parent 8491c5bfef
commit c28a2c2031
+2 -2
View File
@@ -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