From 01a4b07c2136564f93a6332926d481e2bfa2aaf8 Mon Sep 17 00:00:00 2001 From: liufumingren Date: Wed, 25 Nov 2026 21:19:52 +0800 Subject: [PATCH] =?UTF-8?q?fix(warehouseNotify):=20=E5=9B=9E=E8=B0=83?= =?UTF-8?q?=E5=9C=B0=E5=9D=80=E4=B8=BA=E7=A9=BA=E6=97=B6=E8=B7=B3=E8=BF=87?= =?UTF-8?q?=E8=AF=A5=E5=80=99=E9=80=89=E5=BA=94=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 应用已勾选承接 method 但未配置 callback_url 时,原先会拼出非法 URL 并发起请求; 现在直接返回本次尝试失败,保留上层多候选应用兜底逻辑。 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- app/service/systems/warehouseNotify.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/service/systems/warehouseNotify.js b/app/service/systems/warehouseNotify.js index 026ac7d..f4f09de 100644 --- a/app/service/systems/warehouseNotify.js +++ b/app/service/systems/warehouseNotify.js @@ -260,6 +260,16 @@ class WarehouseNotifyService extends Service { `timestamp=${timestamp}`, `sign=${encodeURIComponent(sign)}`, ].join('&'); + // 应用未配置回调地址:视为本次尝试失败,交由上层继续尝试其余候选应用 + if (!config.url) { + return { + success: false, + appId: config.appId, + httpStatus: null, + response: null, + error: '回调地址为空', + }; + } const separator = config.url.includes('?') ? '&' : '?'; const url = `${config.url}${separator}${queryString}`; const startTime = Date.now();