Wang1rrr opened a new pull request, #6967: URL: https://github.com/apache/rocketmq-dashboard/pull/6967
### Which Issue(s) This PR Fixes Fixes #6966. ### Brief Description Cancel the response body when the AI stream content-type check rejects a successful HTTP response. At that point no reader has been created, so the existing reader cleanup never runs. A buffering proxy can otherwise leave a connection open after the UI reports an error. Cancellation failures are swallowed so callers still receive the original structured content-type error. The normal SSE reader and non-2xx error parsing keep their existing behavior. ### How Did You Test This Change? - Added regressions for both `openRunStream` and `attachRunStream`, plus a rejecting body cancellation callback. All three fail on the original code because cancellation is never called. - `npx vitest run src/api/ai.test.ts`: 37 tests passed after the fix. - `npx eslint src/api/ai.ts src/api/ai.test.ts`: passed. - `npx tsc -b`: passed. ### Checklist - [x] One coherent defect fix with a conventional commit. - [x] Regression cases end in `Test`. - [x] No new UI text, dependencies, or server architecture changes. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
