This commit is contained in:
2026-11-04 10:39:33 +08:00
parent cfd4fb06c4
commit e341551190
4 changed files with 9 additions and 4 deletions
+3
View File
@@ -27,6 +27,9 @@ test('operator errors hide internal ids but retain request and trace evidence',
assert.match(message, /错误码:S0500/)
assert.match(message, /requestId:dbde0d81/)
assert.match(message, /traceId:5b0ba4f3/)
const concise = formatApiError(error, '任务处理失败', false)
assert.doesNotMatch(concise, /错误码|requestId|traceId|S0500/)
assert.match(concise, /处理失败/)
assert.equal(sanitizeUserMessage('operation 2092889048731414530 failed'), 'operation 内部标识已隐藏 failed')
})