Default policy don't retry on canceled call
This commit is contained in:
Родитель
37e4b49352
Коммит
f6ba178869
|
@ -128,8 +128,8 @@ export let SimpleWebRequestOptions: SimpleWebRequestOptions = {
|
|||
};
|
||||
|
||||
export function DefaultErrorHandler(webRequest: SimpleWebRequest<any>, errResp: WebErrorResponse) {
|
||||
if (!errResp.statusCode || errResp.statusCode >= 400 && errResp.statusCode < 600) {
|
||||
// Fail 0/4xx/5xx requests immediately. These are permenent failures, and shouldn't have retry logic applied to them.
|
||||
if (errResp.canceled || !errResp.statusCode || errResp.statusCode >= 400 && errResp.statusCode < 600) {
|
||||
// Fail canceled/0/4xx/5xx requests immediately. These are permenent failures, and shouldn't have retry logic applied to them.
|
||||
return ErrorHandlingType.DoNotRetry;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче