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
+2 -2
View File
@@ -266,9 +266,9 @@ test('picking mutations stay closed until the canonical task has been claimed',
}
})
test('completion shows a Chinese server failure with a request correlation id', () => {
test('completion shows a concise Chinese failure and retains correlation ids in diagnostics', () => {
assert.match(page, /remoteFailureMessage\(error, fallback = '操作失败'\)/)
assert.match(page, /formatApiError\(error, fallback\)/)
assert.match(page, /formatApiError\(error, fallback, false\)/)
assert.match(page, /import \{ containerReference, formatApiError, sanitizeUserMessage \}/)
assert.match(page, /requestIdFromServer: error\.requestId/)
assert.match(page, /this\.remoteFailureMessage\(error, '装柜完成失败'\)/)
+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')
})