zmuxuny opened a new pull request, #4507:
URL: https://github.com/apache/rocketmq-dashboard/pull/4507

   ### Which Issue(s) This PR Fixes
   
   - Fixes #4505
   
   ### Brief Description
   
   Aliyun's cloud-catalog responses carry a business-level `success` flag in 
addition to SDK/future completion. Studio previously ignored it in 
`ListRegions`, `ListInstances`, and `GetInstance`, so provider-side business 
failures could appear as an empty catalog or a misleading 404.
   
   This change validates each decoded catalog response before consuming `data`. 
A body with `success != true` now raises a 502-style `BusinessException` using 
the provider message/code. Successful empty data retains the existing 
empty/not-found semantics, and SDK exceptional completions continue through 
`AliyunClientFactory`.
   
   ### Red / Green Verification
   
   Baseline: `master@987b748e8f4f421c5cd3c4c4e51a064cc7e59f18`.
   
   Fail-before:
   - Added three deterministic regressions for `ListRegions`, `ListInstances`, 
and `GetInstance` with normally completed SDK responses carrying 
`success=false`.
   - `AliyunCatalogServiceTest`: **13 tests, exactly 3 failures**.
   - Regions/instances returned normally instead of erroring; GetInstance 
returned 404 instead of preserving the provider failure.
   
   Green, Java 21:
   - `AliyunCatalogServiceTest` + `AliyunClientFactoryTest`: **23/23 passed**, 
0 failures/errors.
   - Checkstyle: **0 violations**.
   - `mvn -B -ntp -DskipTests package`: **BUILD SUCCESS**.
   - `git diff --check`: clean.
   
   No API/schema/dependency/frontend changes.
   
   AI-assisted source audit and implementation; response fields were verified 
against the pinned `alibabacloud-rocketmq20220801:5.0.8` jar and fail-before 
behavior was reproduced before changing production code.
   


-- 
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]

Reply via email to