Skip to content

Commit

Permalink
upd: 补充单测
Browse files Browse the repository at this point in the history
  • Loading branch information
livehigh committed Apr 20, 2023
1 parent 2997cd1 commit 51df582
Show file tree
Hide file tree
Showing 3 changed files with 422 additions and 162 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"conf": "^9.0.0",
"mime-types": "^2.1.24",
"request": "^2.88.2",
"xml2js": "^0.4.19"
"xml2js": "^0.5.0"
},
"devDependencies": {
"@types/node": "^14.14.20",
Expand Down
3 changes: 2 additions & 1 deletion sdk/advance.js
Original file line number Diff line number Diff line change
Expand Up @@ -1308,7 +1308,8 @@ function downloadFile(params, callback) {
['DEEP_ARCHIVE', 'ARCHIVE'].includes(storageClass) &&
(!restoreStatus || restoreStatus === 'ongoing-request="true"')
) {
return callback({statusCode, header: resHeaders, code: 'CannotDownload', message: 'Archive object can not download, please restore to Standard storage class.'});
// 自定义返回的错误码 与cos api无关
return callback({statusCode: 403, header: resHeaders, code: 'CannotDownload', message: 'Archive object can not download, please restore to Standard storage class.'});
}

// 整理文件信息
Expand Down
Loading

0 comments on commit 51df582

Please sign in to comment.