Validate money where you construct it, not at the limit check. Money refuses non-Decimal and non-finite amounts, so NaN never reaches a comparison. Non-positive holds get refused before a transaction exists: nothing recorded, and the idempotency key stays free for the retry.
Was this useful?