Skip to content

Commit 3b3d736

Browse files
committed
Tolerate unexpected Revolut state encoding
asPreRevolutTx.state is read only to pre-filter for completed orders, so make it asMaybe: a strict cleaner aborted the whole page on one odd row (including pending/refunded rows that would be skipped anyway), exhausting retries and stalling the window so the same bad row was re-hit every cycle.
1 parent ea09211 commit 3b3d736

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/partners/revolut.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,12 @@ const asRevolutTx = asObject({
3636

3737
type RevolutTx = ReturnType<typeof asRevolutTx>
3838

39+
// state is read only to pre-filter for completed orders, so tolerate an
40+
// unexpected encoding (asMaybe) rather than throwing: a strict cleaner here
41+
// would abort the whole page on one odd row, exhaust retries, and stall the
42+
// window so the same bad row is re-hit every cycle and never makes progress.
3943
const asPreRevolutTx = asObject({
40-
state: asString
44+
state: asMaybe(asString)
4145
})
4246

4347
const asRevolutResult = asObject({

0 commit comments

Comments
 (0)