Failure handling
Financial failure handling distinguishes rejected, failed, and unknown outcomes.
What it is
Financial failure handling distinguishes rejected, failed, and unknown outcomes.
When to use it
Avoid incorrect retries after network or partial external failures.
Syntax
known rejected -> fail
confirmed success -> settle
unknown -> investigate/reconcileExample
// If provider times out after receiving request:
// Persist unknown outcome with a stable external reference.
// Query/reconcile before initiating a second operation.
// Retry only with the provider’s idempotency contract.Common mistakes
Timeout is not evidence that no money moved; do not invent success or blindly repeat a charge.