fix: Qiniu上传失败消息带HTTP状态码和具体错误
This commit is contained in:
@@ -68,8 +68,9 @@ public class QiniuStorageService implements StorageService {
|
|||||||
uploadManager.put(content.getBytes(), path, auth.uploadToken(bucket));
|
uploadManager.put(content.getBytes(), path, auth.uploadToken(bucket));
|
||||||
log.debug("Qiniu 上传: {}", path);
|
log.debug("Qiniu 上传: {}", path);
|
||||||
} catch (QiniuException e) {
|
} catch (QiniuException e) {
|
||||||
log.error("Qiniu 上传失败 {}: {}", path, e.response != null ? e.response.error : e.getMessage());
|
String detail = e.response != null ? "code=" + e.response.statusCode + " " + e.response.error : e.getMessage();
|
||||||
throw new RuntimeException("Qiniu upload failed: " + path, e);
|
log.error("Qiniu 上传失败 {}: {}", path, detail, e);
|
||||||
|
throw new RuntimeException("Qiniu upload failed: " + path + " (" + detail + ")", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user