fix(fetch): 钉钉空文档显式报 empty_document
DingTalk exports empty online documents to valid but contentless docx/xlsx; WeKnora then rejects them with a generic remote_parse_failed. Detect blank exports (no text, no embedded media) at fetch time and report the cause in Chinese, and add the matching dead-letter hint.
This commit is contained in:
@@ -38,6 +38,7 @@ const failureHint = (failure: JobFailure) => {
|
||||
if (detail.includes('invalid_format')) return '取回的内容不是有效的文档/文本格式,可能源头文件本身损坏;可下载原件确认后重试。'
|
||||
if (detail.includes('source_unavailable')) return '来源服务当时不可达(网络/接口抖动)。任务若已自动重试成功,这里只是历史记录;仍在列表说明源头仍不可达。'
|
||||
if (failure.error_code === 'test_upload_remote_failed' || detail.includes('test_upload_remote_failed')) return '向测试知识库上传被拒:确认 WeKnora 测试实例可达、目标知识库未停用后,点击重新入队。'
|
||||
if (detail.includes('empty_document')) return '钉钉文档正文为空(源头就是空文档),解析器拒收空内容;无需重试,在钉钉里补充内容后重新取件即可。'
|
||||
if (failure.error_code === 'remote_parse_failed') return '文档解析失败:建议先在 WeKnora 手动解析该文件确认格式,再重新入队。'
|
||||
if (failure.error_code === 'handler_error') return '处理环节报错,展开原始错误定位;确认原因后可重新入队。'
|
||||
return `错误码 ${failure.error_code}:确认原因后可重新入队。`
|
||||
|
||||
Reference in New Issue
Block a user