You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This adds a second argument to the `SindriClient()` constructor which can
include a `retryOptions` field which controls the newly added retry behavior.
The options are passed through to the `retry` package and are documented
[here](https://www.npmjs.com/package/retry#retrytimeoutsoptions). By default,
we'll retry 4 times with exponential backoff starting at a 1000 ms timeout. The
logic to determine whether to retry is hard-coded, we retry for status codes of
502-504 or any sort of connection errors.
Note that we use a fork of `p-retry` here which supports both ESM and CJS because we provide builds for each in our package (see: sindresorhus/p-retry/issues/76).
Closes#118
Merges #120
LGTM given by: @katiemckeon
Add API retry logic to all Sindri API Calls
To mitigate common api connectivity issues, we should implement simple retry logic for 502, 503, and 504 error codes.
The sindri python SDK already implements this retry logic. Please use it as a reference.
https://github.com/Sindri-Labs/sindri-python/blob/5da072e1631a13532fbacabfc550ba2b11fe1669/src/sindri/sindri.py#L239-L248
The text was updated successfully, but these errors were encountered: