Skip to content

Commit 4a50ddc

Browse files
committed
Merge branch 'main' of github.com:ModusCreateOrg/app-med-ai-gen into ADE-200
2 parents a8da4ff + 17d85a6 commit 4a50ddc

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

backend/src/reports/reports.service.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -421,8 +421,9 @@ export class ReportsService {
421421
{ field: 'summary', value: report.summary },
422422
{ field: 'confidence', value: report.confidence },
423423
{ field: 'status', value: report.status },
424-
{ field: 'missingInformation', value: report.missingInformation },
425-
{ field: 'isMedicalReport', value: report.isMedicalReport },
424+
{ field: 'missingInformation', value: report.missingInformation || [] },
425+
{ field: 'isMedicalReport', value: report.isMedicalReport || undefined },
426+
{ field: 'errorMessage', value: report.errorMessage || '' },
426427
{ field: 'updatedAt', value: report.updatedAt },
427428
];
428429

@@ -494,7 +495,11 @@ export class ReportsService {
494495
}
495496
}
496497

497-
throw new InternalServerErrorException(`Failed to update report with ID ${report.id}`);
498+
throw new InternalServerErrorException(
499+
`Failed to update report with ID ${report.id}${
500+
error instanceof Error && error.message ? ` ${error.message}` : ''
501+
}`,
502+
);
498503
}
499504
}
500505

frontend/src/pages/Processing/ProcessingPage.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,15 @@ const ProcessingPage: React.FC = () => {
7272
console.log('Processing complete');
7373

7474
history.push(`/tabs/reports/${reportId}`);
75-
} else if (data.isMedicalReport === false) {
76-
setIsProcessing(false);
77-
clearStatusCheckInterval();
78-
setError(missingDataHeading, missingDataMessage);
7975
} else if (data.status === 'failed') {
76+
if (data.isMedicalReport === false) {
77+
setIsProcessing(false);
78+
clearStatusCheckInterval();
79+
setError(missingDataHeading, missingDataMessage);
80+
81+
return;
82+
}
83+
8084
throw new Error();
8185
}
8286
} catch {

0 commit comments

Comments
 (0)