Skip to content

Commit 73fa1eb

Browse files
committed
chore(tiny-erp): Additional debugs for product import
1 parent 32406b8 commit 73fa1eb

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/apps/tiny-erp/src/integration/import-product-from-tiny.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,16 @@ const importProduct = async (
110110
}
111111

112112
if (!product && tinyProduct && tipo === 'produto') {
113+
logger.info('Tiny product to import', {
114+
tinyProduct,
115+
canCreateNew,
116+
});
113117
if (!canCreateNew) {
114118
return null;
115119
}
116120
return parseProduct(tinyProduct, appData, tipo, true)
117121
.then((bodyProduct) => {
122+
logger.info(`Creating ${queueSku}`, { bodyProduct });
118123
return api.post('products', bodyProduct);
119124
});
120125
}
@@ -204,6 +209,7 @@ const importProduct = async (
204209
return handleTinyStock(tinyStockUpdate, tinyStockUpdate.produto);
205210
}
206211
if (tinyStockUpdate?.tipo === 'produto' && !queueProductId) {
212+
logger.info(`Handling new SKU ${queueSku}`);
207213
return handleTinyStock(tinyStockUpdate, tinyStockUpdate.produto);
208214
}
209215

0 commit comments

Comments
 (0)