Fix(request) retries is broken (#1005)
At the moment, when the method `shouldRetryCondition` is called, the condition are using OR which does not take in count 0 which is also considered as false a simple fix is the usage of nullish coalescing
This commit is contained in:
1 parent
f4f9653efc
commit
f115855282
1 file changed
+2
-2
@@ -159,8 +159,8 @@ class Client {
|
||||
if (cfg) {
|
||||
return this.shouldRetryCondition(
|
||||
err,
|
||||
cfg.currentRetryAttempt || 1,
|
||||
cfg.retry || 3
|
||||
cfg.currentRetryAttempt ?? 1,
|
||||
cfg.retry ?? 3
|
||||
)
|
||||
} else {
|
||||
return false
|
||||
|
||||
Reference in new issue
Block a user