diff --git a/lib/policies/systemErrorRetryPolicy.ts b/lib/policies/systemErrorRetryPolicy.ts index c35148c..cba6b1c 100644 --- a/lib/policies/systemErrorRetryPolicy.ts +++ b/lib/policies/systemErrorRetryPolicy.ts @@ -121,7 +121,7 @@ function retry(policy: SystemErrorRetryPolicy, request: WebResource, operationRe .then(res => retry(policy, request, res, retryData, err)) .catch(err => retry(policy, request, operationResponse, retryData, err)); } else { - if (err == undefined) { + if (err != undefined) { // If the operation failed in the end, return all errors instead of just the last one err = retryData.error; return Promise.reject(err);