fix(warehouseNotify): 回调地址为空时跳过该候选应用
应用已勾选承接 method 但未配置 callback_url 时,原先会拼出非法 URL 并发起请求; 现在直接返回本次尝试失败,保留上层多候选应用兜底逻辑。 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
60a2027741
commit
01a4b07c21
@ -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();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user