btlqql opened a new pull request, #429: URL: https://github.com/apache/rocketmq-dashboard/pull/429
## Summary Fixes the shared frontend API client so RocketMQ Studio accepts the backend's successful `Result.ok(...)` response contract. Successful real API requests with business code `200` now resolve normally instead of being reported as failures. ## Root cause The backend `Result.ok(...)` methods return business code `200`, while the frontend response interceptor treated every defined code other than `0` as an error. This converted valid HTTP 200 responses into rejected promises across all frontend services when mock mode was disabled. ## Changes delivered - accepts business code `200` from the current backend contract; - retains compatibility with the existing `0` success code; - passes through responses that do not use a business envelope; - rejects other business codes and displays the backend-provided message; - uses a stable fallback message for malformed error envelopes; - preserves Bearer token injection behavior; - adds a Vitest test command and six regression tests covering the shared client contract. ## User impact Cluster, topic, consumer, ACL, message, operations, and settings services can consume successful backend responses through the shared Axios client without false error notifications. ## Validation - `npm ci --ignore-scripts --no-audit --no-fund` - `npm test` — 1 test file, 6 tests passed - `npm run lint` — 0 errors; the 3 warnings are unchanged from the base branch - `npm run build` — TypeScript and Vite production build succeeded - pre-commit ESLint and Prettier checks passed Fixes #428 Related to apache/rocketmq#10600. -- 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]
