Retries
The libraries retry a failed call for you, but only when they can be sure the call didn't run. A successful check is charged, so a library never sends a call twice if the first one might have gone through.
What the libraries retry#
429 Too Many Requests- Retried after the
Retry-Afterheader's wait. Nothing was charged. 5xx server errors- Retried. Nothing was charged.
A connection that never opened- Connection refused, a DNS failure, an unreachable host or a connect timeout. The request never reached us, so it's safe to send again.
By default a call is retried twice, so it's tried up to three times. The wait between tries grows: half a second, then one second, up to eight seconds, with some random jitter so many clients don't retry at the same moment. A Retry-After header wins over that schedule, up to 60 seconds.
What they never retry#
If you see one of those errors, check the result on verisec.dev before you send the call again.
Changing the defaults#
The default timeout is 300 seconds per attempt, because a full cheque read can take around 250 seconds. Every library lets you set the number of retries and the timeout, for the whole client or for one call:
const client = new VeriSec({ maxRetries: 3, timeout: 60_000 });Set retries to 0 to handle every failure yourself.