Improve workflow error messaging
This commit is contained in:
@@ -99,9 +99,9 @@ describe('task notification builder', () => {
|
||||
const notification = buildTaskNotification(baseTask({
|
||||
task_type: 'analyze_filing',
|
||||
status: 'failed',
|
||||
stage: 'failed',
|
||||
stage_detail: 'Primary filing document fetch failed.',
|
||||
error: 'Primary filing document fetch failed.',
|
||||
stage: 'analyze.fetch_document',
|
||||
stage_detail: 'Could not load the primary filing document.',
|
||||
error: 'Could not load the primary filing document for AAPL · 0000320193-26-000001. Retry the job after confirming the SEC source is reachable.',
|
||||
stage_context: {
|
||||
subject: {
|
||||
ticker: 'AAPL',
|
||||
@@ -116,7 +116,8 @@ describe('task notification builder', () => {
|
||||
}));
|
||||
|
||||
expect(notification.tone).toBe('error');
|
||||
expect(notification.detailLine).toBe('Primary filing document fetch failed.');
|
||||
expect(notification.statusLine).toBe('Failed during fetch primary document');
|
||||
expect(notification.detailLine).toBe('Could not load the primary filing document.');
|
||||
expect(notification.actions.some((action) => action.id === 'open_filings')).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user