unbridled-41 opened a new issue, #4557:
URL: https://github.com/apache/rocketmq-dashboard/issues/4557
### Before Creating the Issue
- [x] I have searched the open issues of this repository and believe this is
not a duplicate.
- [x] This is a defect in RocketMQ Studio.
### Studio Version
branch: `master`, commit `d50ffecc`
### Describe the Bug
`NotificationOutboxService.sendTestMessage` (backing `POST
/api/settings/general/test-notification`) throws `IllegalArgumentException` for
an unknown channel and `IllegalStateException` for every delivery failure ("No
configured dingtalk webhook", "SMTP is not configured", "DingTalk rejected
webhook: …", "Unable to sign DingTalk webhook", …). `GlobalExceptionHandler`
has no mapping for either type, so they fall into the generic `Exception`
handler and surface as HTTP 500 with the hard-coded body `Internal Server
Error`.
The settings page reads `response.data.message`
(`GeneralSettingsTab.sendTest`), so the operator sees the same useless
"Internal Server Error" whether the channel is misspelled, the webhook is not
configured, SMTP is missing, or the remote side rejected the signed request.
All diagnostic information is discarded after `log.error`.
### Steps to Reproduce
```
curl -i -X POST
'http://localhost:8888/api/settings/general/test-notification?channel=dingtalk'
\
-b <admin session cookie>
# → HTTP 500, body: {"code":500,"message":"Internal Server Error"}
```
with an empty dingtalk webhook (or `channel=sms` with no SMS configuration,
etc.). Every failure mode of the three Test buttons returns the identical body.
### What Did You See Instead?
HTTP 500 `Internal Server Error` with the reason visible only in server logs.
### What Did You Expect to See?
A 4xx/5xx business error whose `message` carries the configuration reason,
so the settings UI can show what to fix (the frontend already renders
`data.message`).
### Related work
- #3220 / open PR #4410 add a channel-readiness drawer — a different,
complementary feature; it does not change how a failed test delivery reports
its reason.
- `BusinessException` is the established vehicle for actionable 4xx/5xx
reasons (`GlobalExceptionHandler` renders `ex.getMessage()`), used by sibling
services.
### PR
Fix incoming.
--
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]