You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "btlqql (via GitHub)" <gi...@apache.org> on 2026/10/09 12:41:22 UTC
[PR] fix(studio): handle user modal validation rejections [rocketmq-dashboard]
btlqql opened a new pull request, #5839:
URL: https://github.com/apache/rocketmq-dashboard/pull/5839
## Why
`createUser` and `updatePassword` await `form.validateFields()` outside their try/catch, and the modals call them fire-and-forget (`onOk={() => void createUser()}`). Every failed validation therefore escapes as an unhandled promise rejection. The other settings modals (DataSourceTab, CloudCredentialTab) already guard this with the `errorFields` check.
## What changed
- Move `validateFields()` inside the try and return early when the rejection carries `errorFields` (antd already renders the field errors); other failures still surface via `message.error`.
## Validation
- New test `UserManagementModalValidation.test.tsx` clicks OK on both modals with empty forms and asserts field errors render, no API call is made, and no unhandled rejection leaks. Fails before the fix (the rejection is captured), passes after.
- Note: `UserManagement.test.tsx` 'exports all users that match the active filters' fails on pristine rocketmq-studio as well (pre-existing debounce flake), unrelated to this change.
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(studio): handle user modal validation rejections [rocketmq-dashboard]
Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins merged PR #5839:
URL: https://github.com/apache/rocketmq-dashboard/pull/5839
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org