浏览代码

oss delete

丁云鹏 10 月之前
父节点
当前提交
cd13502ce6

+ 2 - 1
recommend-feature-produce/src/main/java/com/tzld/piaoquan/recommend/feature/produce/service/OSSService.java

@@ -35,7 +35,8 @@ public class OSSService implements Serializable {
                 CopyObjectResult result = ossClient.copyObject(request);
             } catch (OSSException oe) {
                 if (oe.getErrorCode().equals("NoSuchKey")
-                        || oe.getErrorCode().equals("InvalidObjectState")) {
+                        || oe.getErrorCode().equals("InvalidObjectState")
+                        || oe.getErrorMessage().equals("Access denied by bucket policy.")) {
                     continue;
                 } else {
                     throw oe;