File tree Expand file tree Collapse file tree 1 file changed +1
-6
lines changed
api/src/main/java/io/kafbat/ui/service/mcp Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -93,12 +93,7 @@ private Mono<CallToolResult> toCallResult(Object result) {
9393 private Mono <CallToolResult > reponseToCallResult (ResponseEntity <?> response ) {
9494 HttpStatusCode statusCode = response .getStatusCode ();
9595 if (statusCode .is2xxSuccessful () || statusCode .is1xxInformational ()) {
96- Object body = response .getBody ();
97- // Handle Flux response bodies by collecting them into a list
98- if (body instanceof Flux <?> flux ) {
99- return flux .collectList ().map (this ::callToolResult );
100- }
101- return Mono .just (this .callToolResult (body ));
96+ return toCallResult (response .getBody ());
10297 } else {
10398 try {
10499 return Mono .just (toErrorResult (objectMapper .writeValueAsString (response .getBody ())));
You can’t perform that action at this time.
0 commit comments