monitoring: alert on failed refunds and stale withdrawal requests #621
Etiketter
Inga etiketter
area/backups
area/ci
area/control-panel
area/identity
area/infra
area/observability
area/payments
area/security
area/storage
area/web
blocked
needs-info
needs-triage
priority
high
priority
low
priority
medium
ready-for-implementation
type
bug
type
chore
type
docs
type
epic
type
feature
type
task
wontfix
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Inget förfallodatum satt.
Beroenden
Inga beroenden satta
Referens
bitborg/bitborg-infra#621
Läser in…
Hänvisa till i nytt ärende
Ingen beskrivning angiven.
Ta bort grenen "%!s()"
Borttagning av en gren är permanent. Även om den borttagna grenen kan fortsätta existera en kort tid innan den faktiskt tas bort, kan det INTE ångras i de flesta fall. Vill du fortsätta?
What
Alert an operator when a withdrawal request ends stale or invalid, or when its refund fails.
Why
A consumer who withdraws is owed a refund within a statutory window. Today a failed withdrawal refund is at most a log line (bitborg/bitborg-payment#115, bitborg/bitborg-web#326). Nobody reads logs unless something pages them.
Billing-container log alerts (webhook, refund, sweep) are tracked in #692. This issue covers the portal withdrawal path only.
Failing case
Mollie fails a withdrawal refund to a closed card. The billing row is
failed. No alert fires, and the refund is never settled.Fix
bitborg-weblog lines written bysrc/lib/withdrawal.ts:[withdraw] refund failed for <sub>, settle by hand[withdraw] request for <sub> ended as stale, settle by hand[withdraw] request for <sub> ended as invalid, settle by handDepends on bitborg/bitborg-payment#115 and bitborg/bitborg-web#326 for the log prefixes.
Done when