Aias00 opened a new issue, #846:
URL: https://github.com/apache/rocketmq-dashboard/issues/846

   ### Problem
   
   The Studio alert rule create/update endpoints accept request bodies as 
`AlertRuleVO` without guarding the object itself. A JSON literal `null` can 
bind as a null object.
   
   `AlertService.createRule` currently logs `rule.getName()` before any null 
guard, so `POST /api/alert-rules/create` with `null` can fail with an internal 
NullPointerException instead of a structured 400 response. The update endpoint 
should use the same request-body contract and reject null bodies before 
invoking the service.
   
   ### Expected behavior
   
   Alert rule write APIs should reject null request bodies with a clear 400 
response and should not invoke repository operations.
   
   ### Suggested fix
   
   Add controller/service null guards for alert rule create/update requests and 
add controller/service tests for the null request path.
   
   ### Scope
   
   RocketMQ Studio / METRICS-01 alert rule management API validation.


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