Skip to content

fix auto-redeem failures surfacing for ops#18

Open
mooncitydev wants to merge 1 commit into
ForgeYields:mainfrom
mooncitydev:fix-auto-redeem-error-propagation
Open

fix auto-redeem failures surfacing for ops#18
mooncitydev wants to merge 1 commit into
ForgeYields:mainfrom
mooncitydev:fix-auto-redeem-error-propagation

Conversation

@mooncitydev
Copy link
Copy Markdown

hey, was reading the relayer auto-redeem path and noticed a few places errors were effectively swallowed.

execute() caught failures from processAutoRedeem(), logged them, then returned without rethrowing. The loop in main.ts only sees real failures when the promise rejects, so a broken run could look like a quiet success from outside (metrics, k8s exit code if someone wraps this differently, etc.). Now the error propagates after logging.

findPendingRedeems() returned an empty list on any prisma error, which looks the same as "nothing to claim" and can hide a dead database or bad query. Db errors now bubble up.

For batches, one failing processBatch used to log and continue, so you could burn through the loop and still finish the tick without a top-level failure even if half the redeems never got submitted. It now collects failures and throws an AggregateError with per-batch context so you get one loud failure with counts.

cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant