|
|
@@ -203,15 +203,13 @@ public class OssConsoleClient {
|
|
|
int statusCode = httpResponse.statusCode();
|
|
|
String body = httpResponse.body();
|
|
|
if (statusCode != 200) {
|
|
|
- String errMsg = String.format("%s -> %s", statusCode, body);
|
|
|
- throw new Exception(errMsg);
|
|
|
+ throw new Exception(body);
|
|
|
}
|
|
|
|
|
|
Type type = new TypeToken<WebResult<ObjectInfo>>(){}.getType();
|
|
|
WebResult<ObjectInfo> webResult = JsonConverter.jsonToObject(body, type);
|
|
|
if (webResult.getCode() != 0) {
|
|
|
- String errMsg = String.format("%s - %s", webResult.getCode(), webResult.getMsg());
|
|
|
- throw new Exception(errMsg);
|
|
|
+ throw new Exception(webResult.getMsg());
|
|
|
}
|
|
|
|
|
|
return webResult.getData();
|
|
|
@@ -228,8 +226,7 @@ public class OssConsoleClient {
|
|
|
int statusCode = httpResponse.statusCode();
|
|
|
String body = httpResponse.body();
|
|
|
if (statusCode != 200) {
|
|
|
- String errMsg = String.format("%s -> %s", statusCode, body);
|
|
|
- throw new Exception(errMsg);
|
|
|
+ throw new Exception(body);
|
|
|
}
|
|
|
|
|
|
Type type = new TypeToken<WebResult<String>>(){}.getType();
|
|
|
@@ -256,15 +253,13 @@ public class OssConsoleClient {
|
|
|
int statusCode = httpResponse.statusCode();
|
|
|
String body = httpResponse.body();
|
|
|
if (statusCode != 200) {
|
|
|
- String errMsg = String.format("%s -> %s", statusCode, body);
|
|
|
- throw new Exception(errMsg);
|
|
|
+ throw new Exception(body);
|
|
|
}
|
|
|
|
|
|
Type type = new TypeToken<WebResult<VideoInfo>>(){}.getType();
|
|
|
WebResult<VideoInfo> webResult = JsonConverter.jsonToObject(body, type);
|
|
|
if (webResult.getCode() != 0) {
|
|
|
- String errMsg = String.format("%s - %s", webResult.getCode(), webResult.getMsg());
|
|
|
- throw new Exception(errMsg);
|
|
|
+ throw new Exception(webResult.getMsg());
|
|
|
}
|
|
|
|
|
|
return webResult.getData();
|
|
|
@@ -282,15 +277,13 @@ public class OssConsoleClient {
|
|
|
int statusCode = httpResponse.statusCode();
|
|
|
String body = httpResponse.body();
|
|
|
if (statusCode != 200) {
|
|
|
- String errMsg = String.format("%s -> %s", statusCode, body);
|
|
|
- throw new Exception(errMsg);
|
|
|
+ throw new Exception(body);
|
|
|
}
|
|
|
|
|
|
Type type = new TypeToken<WebResult<ImageInfo>>(){}.getType();
|
|
|
WebResult<ImageInfo> webResult = JsonConverter.jsonToObject(body, type);
|
|
|
if (webResult.getCode() != 0) {
|
|
|
- String errMsg = String.format("%s - %s", webResult.getCode(), webResult.getMsg());
|
|
|
- throw new Exception(errMsg);
|
|
|
+ throw new Exception(webResult.getMsg());
|
|
|
}
|
|
|
|
|
|
return webResult.getData();
|
|
|
@@ -312,15 +305,13 @@ public class OssConsoleClient {
|
|
|
int statusCode = httpResponse.statusCode();
|
|
|
String body = httpResponse.body();
|
|
|
if (statusCode != 200) {
|
|
|
- String errMsg = String.format("%s -> %s", statusCode, body);
|
|
|
- throw new Exception(errMsg);
|
|
|
+ throw new Exception(body);
|
|
|
}
|
|
|
|
|
|
Type type = new TypeToken<WebResult<ConvertedImageInfo>>(){}.getType();
|
|
|
WebResult<ConvertedImageInfo> webResult = JsonConverter.jsonToObject(body, type);
|
|
|
if (webResult.getCode() != 0) {
|
|
|
- String errMsg = String.format("%s - %s", webResult.getCode(), webResult.getMsg());
|
|
|
- throw new Exception(errMsg);
|
|
|
+ throw new Exception(webResult.getMsg());
|
|
|
}
|
|
|
|
|
|
return webResult.getData();
|
|
|
@@ -337,15 +328,13 @@ public class OssConsoleClient {
|
|
|
int statusCode = httpResponse.statusCode();
|
|
|
String body = httpResponse.body();
|
|
|
if (statusCode != 200) {
|
|
|
- String errMsg = String.format("%s -> %s", statusCode, body);
|
|
|
- throw new Exception(errMsg);
|
|
|
+ throw new Exception(body);
|
|
|
}
|
|
|
|
|
|
Type type = new TypeToken<WebResult<AudioInfo>>(){}.getType();
|
|
|
WebResult<AudioInfo> webResult = JsonConverter.jsonToObject(body, type);
|
|
|
if (webResult.getCode() != 0) {
|
|
|
- String errMsg = String.format("%s - %s", webResult.getCode(), webResult.getMsg());
|
|
|
- throw new Exception(errMsg);
|
|
|
+ throw new Exception(webResult.getMsg());
|
|
|
}
|
|
|
|
|
|
return webResult.getData();
|
|
|
@@ -375,15 +364,13 @@ public class OssConsoleClient {
|
|
|
int statusCode = httpResponse.statusCode();
|
|
|
String body = httpResponse.body();
|
|
|
if (statusCode != 200) {
|
|
|
- String errMsg = String.format("%s -> %s", statusCode, body);
|
|
|
- throw new Exception(errMsg);
|
|
|
+ throw new Exception(body);
|
|
|
}
|
|
|
|
|
|
Type type = new TypeToken<WebResult<String>>(){}.getType();
|
|
|
WebResult<String> webResult = JsonConverter.jsonToObject(body, type);
|
|
|
if (webResult.getCode() != 0) {
|
|
|
- String errMsg = String.format("%s - %s", webResult.getCode(), webResult.getMsg());
|
|
|
- throw new Exception(errMsg);
|
|
|
+ throw new Exception(webResult.getMsg());
|
|
|
}
|
|
|
}
|
|
|
|