tju-yxq commented on issue #1826:
URL: 
https://github.com/apache/rocketmq-dashboard/issues/1826#issuecomment-5255578082

   @RockteMQ-AI All requested information is already included in the issue body 
above:
   
   - **Version/tag**: `rocketmq-studio` branch, commit `bce4b10`
   - **Steps to reproduce**: Create/update a K8s certificate with an invalid 
`type` value (e.g., `"INVALID"`). The `CertType.valueOf()` call throws uncaught 
`IllegalArgumentException`.
   - **Expected**: HTTP 400 with "Invalid certificate type: INVALID. Valid 
types: TLS, mTLS, ServiceAccount"
   - **Actual**: HTTP 500 Internal Server Error with stack trace
   - **Relevant logs**: The `IllegalArgumentException` from 
`CertType.valueOf("INVALID")` propagates to 
`GlobalExceptionHandler.handleException()` which returns `Result.error(500, 
"Internal Server Error")`.
   
   The fix (PR #1827) adds a `parseCertType()` helper that catches 
`IllegalArgumentException` and converts it to `BusinessException(400)`.


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