feat(platform-web): include trace id in api errors
This commit is contained in:
@@ -38,7 +38,7 @@ test('rawFramesQuery posts structured JSON instead of URL query strings', async
|
||||
});
|
||||
});
|
||||
|
||||
test('api errors include backend message and detail', async () => {
|
||||
test('api errors include backend message, detail, and trace id', async () => {
|
||||
vi.spyOn(globalThis, 'fetch').mockResolvedValue({
|
||||
ok: false,
|
||||
status: 500,
|
||||
@@ -53,5 +53,5 @@ test('api errors include backend message and detail', async () => {
|
||||
})
|
||||
} as Response);
|
||||
|
||||
await expect(api.opsHealth()).rejects.toThrow('服务处理失败: TDengine timeout');
|
||||
await expect(api.opsHealth()).rejects.toThrow('服务处理失败: TDengine timeout (traceId: trace-error)');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user