The GitHub Actions job "CI" on rocketmq-dashboard.git/fix/blob-error-envelope 
has failed.
Run started by GitHub user unbridled-41 (triggered by unbridled-41).

Head commit for run:
d513e2c7aa54041139278b633cb8c6800e352839 / unbridled-41 
<[email protected]>
fix(api): keep the backend message on a rejected blob export

The response interceptor extracts the server's envelope from 
error.response.data,
but a `responseType: 'blob'` request hands that body back as a Blob:

    BLOB response.data type : Blob
    BLOB data.code          : undefined      -> getBusinessError returns null
    BLOB error.message      : "Request failed with status code 501"
    JSON twin error.message : "DLQ operations are not supported for cloud 
instances"

So every export endpoint lost its server-supplied reason: no toast, and the
caller's describeThrownMessage-based message showed axios's transport text. The
affected sites are the ones that use responseType 'blob' (the DLQ Excel export,
the alert-rule asset export and the metrics/Grafana exports), whose refusals are
concrete facts the operator needs:

    DLQService:       501 "DLQ operations are not supported for cloud instances"
    DLQService:       400 "At most 100 msgIds are allowed per export"
    AuditService:     400 "Audit log export exceeds the maximum of 10000 
records; narrow the filters"

Read the envelope out of the blob (parse its text, run the same
getBusinessError), and leave the transport error untouched when the body carries
no envelope or cannot be read.

Tests (web/): npx vitest run src/api/client.test.ts -> Tests 16 passed; the 
whole
api folder: Test Files 30 passed, Tests 249 passed.
- new case "extracts the backend message from a rejected blob export" fails 
before
  this change (`Request failed with status code 501`) and passes after it.
- new case "keeps the transport error when a rejected blob carries no envelope"
  guards that a non-JSON body still surfaces axios's message and no toast.
- npx eslint reports no errors; npx tsc -b passes.

Report URL: 
https://github.com/apache/rocketmq-dashboard/actions/runs/37975516054

With regards,
GitHub Actions via GitBox

Reply via email to