Skip to content

Commit 02df57a

Browse files
chore: remove no authenticated cart
1 parent 21ecde9 commit 02df57a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

functions/lib/cron-add-carts.js

+2
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,13 @@ module.exports = async ({ appSdk }) => {
2121
cart = (await appSdk.apiRequest(storeId, `/carts/${cartId}.json`)).response.data
2222
} catch (error) {
2323
const status = error.response?.status
24+
await docs[i].ref.delete()
2425
if (status > 400 && status < 500) {
2526
logger.warn(`failed reading cart ${cartId} for #${storeId}`, {
2627
status,
2728
response: error.response.data
2829
})
30+
2931
} else {
3032
throw error
3133
}

0 commit comments

Comments
 (0)