Skip to content

Timeout

What is Timeout?

A limit on how long your program waits for an operation before it stops waiting and reports a failure.

A timeout bounds waiting, but does not prove the remote operation stopped. For example, checkout may time out while the payment provider still completes the charge. Before trying again, check the payment status or repeat the request with the same idempotency key, a unique identifier for that one intended payment.

When you would use it

Use it whenever an external call could otherwise leave a person or worker waiting indefinitely.

Common operations

  • Set connection and response waiting limits.
  • Handle an unknown outcome before retrying a payment.

Related terms

Where this is taught

Going deeper