fix(server): SSE 代理错误消息不再暴露原始异常信息给客户端

This commit is contained in:
2026-07-19 12:18:54 +08:00
parent 7018f5780a
commit 02c58767bd
@@ -168,7 +168,7 @@ public class ShortNovelServiceImpl implements ShortNovelService {
errorEvent.put("type", "error");
JSONObject errorPayload = new JSONObject();
errorPayload.put("code", "UPSTREAM_ERROR");
errorPayload.put("message", e.getMessage() != null ? e.getMessage() : "外部服务异常");
errorPayload.put("message", "外部服务异常,请稍后重试");
errorEvent.put("payload", errorPayload);
emitter.send(SseEmitter.event().name("error").data(errorEvent.toJSONString()));
} catch (Exception ignored) {