|
|
|
|
|
by nevi-me
542 days ago
|
|
I can't remember the exact detail, but one instance was a function checking whether a user should be paid based on some conditions. It checked the db, and I think because the codebase and db move fast, there was a new enum added a few months prior which was triggered by our transaction type. So that helped function didn't account for the new enum, and we ended up sending >2 payments to users, in some cases I think over 10 to one user. The issue was brought to customer support's attention, else we might have only noticed it at the end of the week, which I think would have led to severe consequences. The consequences never reached us because our PM dealt with them. I suppose in all the financial loss instances, the business absorbed the losses. |
|
This is where Scala/Rust's enforcement of having to handle all arms of a match clause help catch such issues - if you are matching against the enum, you won't even be able to compile if you don't handle all the arms.