You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "Aias00 (via GitHub)" <gi...@apache.org> on 2026/08/03 05:24:30 UTC

[PR] [ISSUE #780] Surface unavailable DLQ provider errors [rocketmq-dashboard]

Aias00 opened a new pull request, #781:
URL: https://github.com/apache/rocketmq-dashboard/pull/781

   Fixes #780.
   
   ### What changed
   - Surface backend DLQ provider errors as visible warnings when the DLQ list fails to load.
   - Surface resend provider errors inside the retry modal.
   - Add regression coverage for list and resend unavailable-provider paths.
   
   ### Validation
   - `npm --prefix web test -- DLQPage.test.tsx`
   - `npm --prefix web exec -- eslint web/src/pages/instance/dlq.tsx web/src/pages/instance/__tests__/DLQPage.test.tsx`
   - `cd web && npx tsc -b --noEmit`


-- 
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] [ISSUE #780] Surface unavailable DLQ provider errors [rocketmq-dashboard]

Posted by "Aias00 (via GitHub)" <gi...@apache.org>.
Aias00 commented on PR #781:
URL: https://github.com/apache/rocketmq-dashboard/pull/781#issuecomment-5175211668

   Superseded by consolidated PR #937, which contains this change and has passing checks. Closing this narrower PR to keep review focused.


-- 
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] [ISSUE #780] Surface unavailable DLQ provider errors [rocketmq-dashboard]

Posted by "Aias00 (via GitHub)" <gi...@apache.org>.
Aias00 closed pull request #781: [ISSUE #780] Surface unavailable DLQ provider errors
URL: https://github.com/apache/rocketmq-dashboard/pull/781


-- 
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] [ISSUE #780] Surface unavailable DLQ provider errors [rocketmq-dashboard]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #781:
URL: https://github.com/apache/rocketmq-dashboard/pull/781#discussion_r3701519125


##########
web/src/pages/instance/dlq.tsx:
##########
@@ -39,9 +40,32 @@ import { listDLQGroups, resendDLQ } from '../../services/messageService';
 
 const { Text } = Typography;
 const { RangePicker } = DatePicker;
+const DEFAULT_LOAD_ERROR = '死信队列加载失败,请稍后重试';
+const DEFAULT_RETRY_ERROR = '提交重投任务失败,请稍后重试';
 
 /* ─── Helpers ─── */
 
+type ApiErrorLike = {
+  message?: unknown;
+  response?: {
+    data?: {
+      message?: unknown;
+    };
+  };
+};
+
+const getErrorMessage = (error: unknown, fallback: string): string => {
+  const apiError = error as ApiErrorLike;
+  const responseMessage = apiError.response?.data?.message;
+  if (typeof responseMessage === 'string' && responseMessage.trim()) {
+    return responseMessage;
+  }
+  if (typeof apiError.message === 'string' && apiError.message.trim()) {
+    return apiError.message;
+  }
+  return fallback;
+};

Review Comment:
   `getErrorMessage` casts `error` to `ApiErrorLike` and then dereferences `apiError.response` / `apiError.message` without guarding the base value. If the promise is rejected with `null`, `undefined`, or a primitive (e.g. `Promise.reject()`), this will throw a TypeError while trying to render the error state, masking the original failure.



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