Skip to content

Commit 4358bc6

Browse files
author
BitsAdmin
committed
Merge branch 'feat/optimize_sse_exception' into 'integration_2025-04-24_877340287234'
feat: [development task] ark runtime (1181216) See merge request iaasng/volcengine-java-sdk!457
2 parents fcc1f91 + 87122de commit 4358bc6

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

volcengine-java-sdk-ark-runtime/src/main/java/com/volcengine/ark/runtime/utils/ResponseBodyCallback.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ public void onResponse(Call<ResponseBody> call, Response<ResponseBody> response)
5858
ArkAPIError.class
5959
);
6060
throw new ArkHttpException(error, e, e.code(), requestId);
61+
} catch (ArkHttpException httpException) {
62+
throw httpException;
6163
} catch (Exception ignore) {
6264
throw new ArkHttpException(new ArkAPIError(new ArkAPIError.ArkErrorDetails(e.getMessage(), "", "", "InternalServiceError")), e, e.code(), requestId);
6365
}
@@ -80,7 +82,8 @@ public void onResponse(Call<ResponseBody> call, Response<ResponseBody> response)
8082
}
8183
} catch (ArkHttpException e) {
8284
throw e;
83-
} catch (Exception ignored) {}
85+
} catch (Exception ignored) {
86+
}
8487

8588
sse = new SSE(data);
8689
} else if (line.equals("") && sse != null) {
@@ -107,7 +110,7 @@ public void onResponse(Call<ResponseBody> call, Response<ResponseBody> response)
107110
try {
108111
reader.close();
109112
} catch (IOException e) {
110-
// do nothing
113+
// do nothing
111114
}
112115
}
113116
}

0 commit comments

Comments
 (0)