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

   ### Motivation
   
   The existing `TencentClientFactoryTest` covers endpoint selection and 
credential invalidation during an in-flight creation, but 
`mapToBusinessException` — the translation of raw Tencent Cloud SDK failures 
into Studio `BusinessException`s — had no coverage at all.
   
   ### Changes
   
   - `mapToBusinessExceptionShouldMapUnauthorizedTo403`: 
`UnauthorizedOperation` keeps the provider message with HTTP 403.
   - `mapToBusinessExceptionShouldMapCredentialFailuresTo422`: credential-level 
codes (`AuthFailure`, `InvalidCredential`, ...) map to 422 with the neutral 
`Cloud credential is invalid` message, keeping 401 reserved for Studio session 
auth.
   - `mapToBusinessExceptionShouldMapNotFoundTo404WithFallbackMessage`: 
`ResourceNotFound` maps to 404 and a missing provider message falls back to the 
resource-not-found text.
   - `mapToBusinessExceptionShouldFallBackToGeneric502`: any other code 
surfaces as a 502 OpenAPI error with the provider message preserved.
   
   ### Verification
   
   ```
   mvn -B test -Dtest=TencentClientFactoryTest
   [INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0
   [INFO] BUILD SUCCESS
   ```


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