wd icon indicating copy to clipboard operation
wd copied to clipboard

Configurable retry error code

Open RLovelett opened this issue 6 years ago • 2 comments

I want wd to retry on ECONNREFUSED in wd/lib/http-utils.js.

As of right now this does not seem possible.

The paths forward seem like:

  1. Modify the function shouldRetryOn to explicitly cover the ECONNREFUSED error code.
  2. Make it configurable via configureHttp and add it as an additional argument to shouldRetryOn.
  3. Something else I have not thought of?

Before I make a PR is there a preference for either 1 or 2?

RLovelett avatar Aug 15 '18 21:08 RLovelett

@jlipps thoughts?

admc avatar Aug 16 '18 18:08 admc

i think i'd prefer option 2, since usually econnrefused means the server is not on and we want to provide that feedback immediately without bothering to retry

jlipps avatar Sep 28 '18 16:09 jlipps