优化 不在频繁报错 试 91 订单失败
This commit is contained in:
@@ -485,6 +485,9 @@ async function syncOpen91OrderAfterSendCallbackSuccess(
|
||||
taskCount: result.tasks.length,
|
||||
})
|
||||
} catch (error) {
|
||||
if (isOpen91OrderAwaitingFulfillmentConfig(error)) {
|
||||
return
|
||||
}
|
||||
logIntegration(
|
||||
'[kuaishou-industry/send-code]',
|
||||
'电子凭证发货回调成功后重试 91 订单失败',
|
||||
@@ -499,6 +502,15 @@ async function syncOpen91OrderAfterSendCallbackSuccess(
|
||||
}
|
||||
}
|
||||
|
||||
function isOpen91OrderAwaitingFulfillmentConfig(error: unknown) {
|
||||
return Boolean(
|
||||
error &&
|
||||
typeof error === 'object' &&
|
||||
String((error as { errorCode?: unknown }).errorCode || '').trim() ===
|
||||
'open91_order_still_unconfigured',
|
||||
)
|
||||
}
|
||||
|
||||
function isRetriableSendCallbackFailure(result: Awaited<ReturnType<typeof sendCallback>>) {
|
||||
if (result.success) {
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user