From a455af2084857c85b1c815646a73438aeaa4faaf Mon Sep 17 00:00:00 2001 From: xiaoyaofenfen <1254525673@qq.com> Date: Thu, 1 Dec 2022 11:32:32 +0800 Subject: [PATCH] handle download delete file error #199 --- internal/functions/pandownload/download_task_unit.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/functions/pandownload/download_task_unit.go b/internal/functions/pandownload/download_task_unit.go index 7b1cbbd..3a68774 100644 --- a/internal/functions/pandownload/download_task_unit.go +++ b/internal/functions/pandownload/download_task_unit.go @@ -284,11 +284,13 @@ func (dtu *DownloadTaskUnit) panHTTPClient() (client *requester.HTTPClient) { return client } +// handleError 下载错误处理器 func (dtu *DownloadTaskUnit) handleError(result *taskframework.TaskUnitRunResult) { switch value := result.Err.(type) { case *apierror.ApiError: switch value.ErrCode() { case apierror.ApiCodeFileNotFoundCode: + case apierror.ApiCodeForbiddenFileInTheRecycleBin: result.NeedRetry = false break default: