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:
committed by
GitHub
parent
f4f9653efc
commit
f115855282
@@ -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