selfxp commented on a change in pull request #227:
URL: 
https://github.com/apache/openwhisk-client-js/pull/227#discussion_r728397971



##########
File path: lib/client.js
##########
@@ -135,7 +150,21 @@ class Client {
       throw new Error(`${messages.INVALID_OPTIONS_ERROR} Missing either api or 
apihost parameters.`)
     }
 
-    return { apiKey: apiKey, api, apiVersion: apiversion, ignoreCerts: 
ignoreCerts, namespace: options.namespace, apigwToken: apigwToken, 
apigwSpaceGuid: apigwSpaceGuid, authHandler: options.auth_handler, noUserAgent: 
options.noUserAgent, cert: options.cert, key: options.key, proxy, agent }
+    // gather retry options
+    const retry = options.retry
+    if (retry && typeof options.retry !== 'object') {
+      throw new Error(`${messages.INVALID_OPTIONS_ERROR} 'retry' option must 
be an object, e.g. '{ retries: 2 }'.`)
+    }
+    if (retry) {
+      // overwrite async-retry defaults, see 
https://github.com/vercel/async-retry#api for more details
+      retry.retries = retry.retries || 2
+      retry.factor = retry.factor || 2
+      retry.minTimeout = retry.minTimeout || 100

Review comment:
       I personally prefer the default `1000`, but given the fact that 
customers can reconfigure this value, `100` should be fine too. 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to