Improve workflow error messaging
This commit is contained in:
@@ -720,15 +720,15 @@ if (process.env.RUN_TASK_WORKFLOW_E2E === '1') {
|
||||
WHERE id = ?;
|
||||
`).run(
|
||||
'failed',
|
||||
'failed',
|
||||
'Primary filing document fetch failed.',
|
||||
'analyze.fetch_document',
|
||||
'Could not load the primary filing document.',
|
||||
JSON.stringify({
|
||||
subject: {
|
||||
ticker: 'AAPL',
|
||||
accessionNumber: '0000000000-26-000021'
|
||||
}
|
||||
}),
|
||||
'Primary filing document fetch failed.',
|
||||
'Could not load the primary filing document for AAPL · 0000000000-26-000021. Retry the job after confirming the SEC source is reachable.',
|
||||
'2026-03-09T15:01:00.000Z',
|
||||
'2026-03-09T15:01:00.000Z',
|
||||
failedTaskId
|
||||
@@ -739,12 +739,14 @@ if (process.env.RUN_TASK_WORKFLOW_E2E === '1') {
|
||||
const failedTask = (failed.json as {
|
||||
task: {
|
||||
notification: {
|
||||
statusLine: string;
|
||||
detailLine: string | null;
|
||||
actions: Array<{ id: string; href: string | null }>;
|
||||
};
|
||||
};
|
||||
}).task;
|
||||
expect(failedTask.notification.detailLine).toBe('Primary filing document fetch failed.');
|
||||
expect(failedTask.notification.statusLine).toBe('Failed during fetch primary document');
|
||||
expect(failedTask.notification.detailLine).toBe('Could not load the primary filing document.');
|
||||
expect(failedTask.notification.actions.some((action) => action.id === 'open_filings')).toBe(true);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user