- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
Documentation AWSJavaScriptSDK 中的 S3.copyObject 方法指示以下内容:
A copy request might return an error when Amazon S3 receives the copy request or while Amazon S3 is copying the files. If the error occurs before the copy operation starts, you receive a standard Amazon S3 error. If the error occurs during the copy operation, the error response is embedded in the 200 OK response. This means that a 200 OK response can contain either a success or an error. Design your application to parse the contents of the response and handle it appropriately.
aws-sdk
中的 copyObject 关联的类型。节点库(即 CopyObjectResult 和 S3.Types.CopyObjectOutput)表明在成功响应中没有报告失败副本的地方。
最佳答案
SDK 本身将 200 个状态 OK 响应转化为特定 API 调用的错误,包括 copyObject。
截至 this commit ,操作completeMultipartUpload
, copyObject
, 和 uploadPartCopy
是 flagged因为能够返回实际上是错误的状态代码 200,并且有一个 handler将这些响应强制转换为错误响应。
关于amazon-web-services - 如何在 AWSJavaScriptSDK 中以 200 OK 结果捕获失败的 S3 copyObject,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61124130/
我有一个 AWS S3 对象和一个在其上创建的读取流,如下所示: const s3 = new AWS.S3(); const readStream = s3 .getObject(params)
Documentation AWSJavaScriptSDK 中的 S3.copyObject 方法指示以下内容: A copy request might return an error when
我是一名优秀的程序员,十分优秀!