0.0.6: Fixing bug in retry logic for DoNotRetry options
This commit is contained in:
Родитель
7f65075fd9
Коммит
b6c67ef344
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "simplerestclients",
|
||||
"version": "0.0.5",
|
||||
"version": "0.0.6",
|
||||
"description": "A library of components for accessing RESTful services with javascript/typescript.",
|
||||
"author": "David de Regt <David.de.Regt@microsoft.com>",
|
||||
"scripts": {
|
||||
|
|
|
@ -544,8 +544,10 @@ export class SimpleWebRequest<T> {
|
|||
// Policy-adaptable failure
|
||||
const handleResponse = (this._options.customErrorHandler || DefaultErrorHandler)(this, errResp);
|
||||
|
||||
const retry = this._options.retries > 0 || handleResponse === ErrorHandlingType.RetryUncountedImmediately ||
|
||||
handleResponse === ErrorHandlingType.RetryUncountedWithBackoff;
|
||||
const retry = handleResponse !== ErrorHandlingType.DoNotRetry && (
|
||||
this._options.retries > 0 ||
|
||||
handleResponse === ErrorHandlingType.RetryUncountedImmediately ||
|
||||
handleResponse === ErrorHandlingType.RetryUncountedWithBackoff);
|
||||
|
||||
if (retry) {
|
||||
if (handleResponse === ErrorHandlingType.RetryCountedWithBackoff) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче