handle download delete file error #199

This commit is contained in:
xiaoyaofenfen 2022-12-01 11:32:32 +08:00
parent 5f6cdcab64
commit a455af2084

View File

@ -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: