Mission ID: P-ONE Difficulty: Level 2 (Debugging) Context: Financial Core / Payment Gateway
We are losing money. Customers are reporting failed transactions (items not received), but our system logs show 100% Success Rate.
Your job is to find the "Ghost Bug" in src/payment.js and fix the architectural flaw.
- Transaction Integrity: If a payment fails for ANY reason (insufficient funds, invalid data, network error), the system MUST throw an error.
- No False Positives: Never return
success: trueif the balance was not actually deducted. - Transparency: Errors must be surfaced, not hidden.
- "Silence is not gold. Silence is a missing stack trace."
- Fork & Clone.
npm installnpm test(Observe the failure: Expecting Error, but got Success).- Fix
src/payment.js. - Submit PR with Liability Waiver.