mirror of
https://github.com/hansjone/dsh-im-ops.git
synced 2026-10-17 13:30:46 +08:00
fix(weixin): report safe delivery diagnostics
This commit is contained in:
parent
64587b3b61
commit
91e2d5962a
6 changed files with 390 additions and 201 deletions
|
|
@ -709,8 +709,13 @@ export function createWeixinApi({ fetchImpl = fetch } = {}) {
|
|||
base_info: baseInfo(),
|
||||
},
|
||||
});
|
||||
if (response?.ret !== undefined && response.ret !== 0) {
|
||||
throw new WeixinApiError('send-rejected', '微信服务拒绝了回复消息。');
|
||||
const sendRejection = rejectedProviderResponse(response);
|
||||
if (sendRejection) {
|
||||
throw new WeixinApiError(
|
||||
'send-rejected',
|
||||
'微信服务拒绝了回复消息。',
|
||||
{ providerCode: sendRejection },
|
||||
);
|
||||
}
|
||||
return true;
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue