Skip to content

Commit 349d4d9

Browse files
committed
fix(import-categories): add error debugging in requests
1 parent ea84873 commit 349d4d9

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

functions/lib/integration/import-category.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ const getCategoriesAll = async ({ appSdk, storeId, auth }) => {
2626
return null
2727
}
2828
})
29-
.catch((_err) => {
30-
return null
31-
})
29+
.catch(console.error)
3230

3331
if (categories && categories.length) {
3432
hasRepeat = categories.length === limit
@@ -87,10 +85,7 @@ module.exports = async ({ appSdk, storeId, auth }, productId, tinyCategories) =>
8785
const { data: { _id } } = response
8886
return { _id, ...body }
8987
})
90-
.catch(e => {
91-
console.error(e)
92-
return null
93-
})
88+
.catch(console.error)
9489
if (newCategory) {
9590
// next interation new category exists in store
9691
allStoreCategories.push(newCategory)

0 commit comments

Comments
 (0)