fix: recover committed dynamic transport errors
This commit is contained in:
@@ -144,7 +144,7 @@ export function createDynamicTurnPersistence(
|
||||
});
|
||||
if (result.error) {
|
||||
const current = await loadCase(value.userId, value.id);
|
||||
if (isStaleRpc(result.error) && current?.journeyProtocol === "dynamic-choice-v2"
|
||||
if (current?.journeyProtocol === "dynamic-choice-v2"
|
||||
&& current.processedActionIds.includes(receipt)) {
|
||||
if (samePersistedDynamicReceipt(value, current, receipt, expectedVersion)) return current;
|
||||
throw new StaleJourneyTurnError(value.id, expectedVersion, current.turnVersion);
|
||||
|
||||
Reference in New Issue
Block a user