Interface RetryPolicy
The handler that decide whether
🔧 Methods
retry
ts
retry(url: URL, attempt: number, error: ValidationError): boolean | Promise<boolean>
Parameters
- url:
URL
- attempt:
number
- error:
ValidationError
Return Type
boolean | Promise<boolean>
ts
retry(url: URL, attempt: number, error: DownloadError): boolean | Promise<boolean>
Parameters
- url:
URL
- attempt:
number
- error:
DownloadError
Return Type
boolean | Promise<boolean>
ts
retry(url: URL, attempt: number, error: any): boolean | Promise<boolean>
You should decide whether we should retry the download again?
Parameters
- url:
URL
The current downloading url - attempt:
number
How many time it try to retry download? The first retry will be1
. - error:
any
The error object thrown during this download. It can be DownloadError or $ValidationError.
Return Type
boolean | Promise<boolean>
Defined in: packages/file-transfer/retry.ts:11, packages/file-transfer/retry.ts:12, packages/file-transfer/retry.ts:21