mirror of
https://github.com/tickstep/aliyunpan.git
synced 2025-02-03 05:47:16 +08:00
handle download delete file error #199
This commit is contained in:
parent
5f6cdcab64
commit
a455af2084
@ -284,11 +284,13 @@ func (dtu *DownloadTaskUnit) panHTTPClient() (client *requester.HTTPClient) {
|
|||||||
return client
|
return client
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// handleError 下载错误处理器
|
||||||
func (dtu *DownloadTaskUnit) handleError(result *taskframework.TaskUnitRunResult) {
|
func (dtu *DownloadTaskUnit) handleError(result *taskframework.TaskUnitRunResult) {
|
||||||
switch value := result.Err.(type) {
|
switch value := result.Err.(type) {
|
||||||
case *apierror.ApiError:
|
case *apierror.ApiError:
|
||||||
switch value.ErrCode() {
|
switch value.ErrCode() {
|
||||||
case apierror.ApiCodeFileNotFoundCode:
|
case apierror.ApiCodeFileNotFoundCode:
|
||||||
|
case apierror.ApiCodeForbiddenFileInTheRecycleBin:
|
||||||
result.NeedRetry = false
|
result.NeedRetry = false
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user