mirror of
https://github.com/zfile-dev/zfile.git
synced 2025-04-19 05:34:52 +00:00
🔊 完善日志输出
This commit is contained in:
@@ -147,7 +147,7 @@ public abstract class MicrosoftDriveServiceBase extends AbstractBaseFileService
|
||||
try {
|
||||
root = oneDriveRestTemplate.exchange(requestUrl, HttpMethod.GET, entity, JSONObject.class, getGraphEndPoint(), getType(), fullPath).getBody();
|
||||
} catch (HttpClientErrorException e) {
|
||||
log.debug("调用 OneDrive 时出现了网络异常, 已尝试重新刷新 token 后再试.");
|
||||
log.debug("调用 OneDrive 时出现了网络异常, 响应信息: {}, 已尝试重新刷新 token 后再试.", e.getResponseBodyAsString());
|
||||
refreshOneDriveToken();
|
||||
root = oneDriveRestTemplate.exchange(requestUrl, HttpMethod.GET, entity, JSONObject.class, getGraphEndPoint(), getType(), fullPath).getBody();
|
||||
}
|
||||
@@ -201,7 +201,7 @@ public abstract class MicrosoftDriveServiceBase extends AbstractBaseFileService
|
||||
try {
|
||||
fileItem = oneDriveRestTemplate.exchange(DRIVER_ITEM_URL, HttpMethod.GET, entity, JSONObject.class, getGraphEndPoint(), getType(), fullPath).getBody();
|
||||
} catch (HttpClientErrorException e) {
|
||||
log.debug("调用 OneDrive 时出现了网络异常, 已尝试重新刷新 token 后再试.");
|
||||
log.debug("调用 OneDrive 时出现了网络异常, 响应信息: {}, 已尝试重新刷新 token 后再试.", e.getResponseBodyAsString());
|
||||
refreshOneDriveToken();
|
||||
fileItem = oneDriveRestTemplate.exchange(DRIVER_ITEM_URL, HttpMethod.GET, entity, JSONObject.class, getGraphEndPoint(), getType(), fullPath).getBody();
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ public class HttpUtil {
|
||||
try {
|
||||
result = restTemplate.getForObject(url, String.class);
|
||||
} catch (Exception e) {
|
||||
throw new TextParseException("文件解析异常");
|
||||
throw new TextParseException("文件解析异常, 请求 url = " + url + ", 异常信息为 = " + e.getMessage());
|
||||
}
|
||||
|
||||
return result == null ? "" : result;
|
||||
|
||||
Reference in New Issue
Block a user