Skip to content

[studio][Bug][Track1] Frontend rejects successful backend responses with code 200 #428

Description

@btlqql

Confirmed defect

RocketMQ Studio's backend wraps successful responses with Result.ok(...), which sets the business code to 200. The frontend Axios response interceptor accepted only business code 0, so a valid HTTP 200 response containing { "code": 200, "message": "success" } was converted into a rejected promise and displayed as an error when real API mode was used.

Delivered fix

The complete fix is implemented in btlqql:agent/studio-api-response-contract at commit cf41b7c:

  • accepts the backend's documented 200 success code;
  • preserves compatibility with the previously accepted 0 success code;
  • passes through non-envelope responses;
  • continues rejecting non-success business codes with the backend message;
  • retains Bearer token injection;
  • adds six automated regression tests for the shared API client contract.

Verification completed

  • npm ci --ignore-scripts --no-audit --no-fund
  • npm test — 6 tests passed
  • npm run lint — 0 errors (3 pre-existing warnings)
  • npm run build — production build succeeded

This is a Track 1 frontend reliability fix associated with the RocketMQ Studio contribution program in apache/rocketmq#10600.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions