fix: Idempotent cart completion (#9231)
What - Store result of cart-completion workflow for three days by default - This enables the built-in idempotency mechanism to kick-in, provided the same transaction ID is used on workflow executions - Return order from cart-completion workflow if the cart has already been completed - In case transaction ID is not used on workflow executions, we still only want to complete a cart once
This commit is contained in:
@@ -1148,7 +1148,7 @@ export class TransactionOrchestrator extends EventEmitter {
|
||||
queue.push({ obj: obj[key], level: [...level] })
|
||||
} else if (key === "action") {
|
||||
if (actionNames.has(obj.action)) {
|
||||
throw new Error(`Action "${obj.action}" is already defined.`)
|
||||
throw new Error(`Step ${obj.action} is already defined in workflow.`)
|
||||
}
|
||||
|
||||
actionNames.add(obj.action)
|
||||
|
||||
Reference in New Issue
Block a user