合并拉取请求 #538

fix dogecloud 保存存储源异常
This commit is contained in:
赵俊
2023-05-27 15:59:35 +08:00
committed by GitHub

View File

@@ -62,6 +62,10 @@ public class DogeCloudServiceImpl extends AbstractS3BaseFileService<DogeCloudPar
String body = httpResponse.body();
JSONObject resultJsonObject = JSONObject.parseObject(body);
if (resultJsonObject.getInteger("code") != 200){
//TODO 根据返回ERR_CODE定义错误类型 https://docs.dogecloud.com/oss/api-introduction?id=%e9%94%99%e8%af%af%e4%bb%a3%e7%a0%81%e5%88%97%e8%a1%a8
throw new IllegalArgumentException(resultJsonObject.getString("msg"));
}
JSONObject credentials = resultJsonObject.getJSONObject("data").getJSONObject("Credentials");
param.setS3AccessKey(credentials.getString("accessKeyId"));