File tree Expand file tree Collapse file tree 2 files changed +16
-7
lines changed
frontend/src/pages/Processing Expand file tree Collapse file tree 2 files changed +16
-7
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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 {
You can’t perform that action at this time.
0 commit comments