unbridled-41 opened a new issue, #5990:
URL: https://github.com/apache/rocketmq-dashboard/issues/5990

   ### Studio Version
   branch: `rocketmq-studio` @ `7e7aa344`
   ### Runtime Environment
   Backend tests: `cd server && mvn -o -B -ntp test 
-Dtest='AlertRuleRequestDTOTest'`.
   ### Describe the Bug
   The create/update path bounds enums and durations but not the free-text 
fields, so the first length check is the database write: a description of 513 
characters (the rule dialog's TextArea has no maxLength) raises 
DataIntegrityViolationException, no handler maps it, and the API answers 500 
"Internal Server Error" with the rule not created. Under a non-strict 
`sql_mode` the value is truncated instead - and for `name` the truncation is 
invisible afterwards because the semantic fingerprint ignores the name.
   ### Steps to Reproduce
   `POST /api/alerts/business/rules` with a 513-character description (or a 
129-character name).
   ### What Did You Expect to See?
   A 400 naming the limit, before any write.
   ### What Did You See Instead?
   A generic 500.
   ### Evidence
   Columns: `name/metric/broker_name/cluster_name/instance_id VARCHAR(128)`, 
`description VARCHAR(512)`, `consumer_group`/`topic VARCHAR(255)`, 
`duration`/`reminder_interval`/`severity`/`threshold_unit VARCHAR(32)`. The 
sibling instance writer documents the rule ("Letting a longer value through 
does not store it: MySQL rejects the write, so the caller gets a 500 from the 
persistence layer instead of the validation error").
   ### Impact
   A legitimate save fails with an unexplainable 500 and no data change.
   ### Acceptance Criteria
   Each text field is bounded to its column with a 400 and a usable message, 
values at the width are still accepted, with regression tests.
   **Corresponding PR:** #ISSUEPR#
   


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