We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 21ecde9 commit 02df57aCopy full SHA for 02df57a
functions/lib/cron-add-carts.js
@@ -21,11 +21,13 @@ module.exports = async ({ appSdk }) => {
21
cart = (await appSdk.apiRequest(storeId, `/carts/${cartId}.json`)).response.data
22
} catch (error) {
23
const status = error.response?.status
24
+ await docs[i].ref.delete()
25
if (status > 400 && status < 500) {
26
logger.warn(`failed reading cart ${cartId} for #${storeId}`, {
27
status,
28
response: error.response.data
29
})
30
+
31
} else {
32
throw error
33
}
0 commit comments