Skip to content

Commit dacaa75

Browse files
committed
fix: Update processing status to FAILED for reports during processing
1 parent 66a607b commit dacaa75

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

backend/src/document-processor/controllers/document-processor.controller.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ export class DocumentProcessorController {
218218
try {
219219
const report = await this.reportsService.findOne(reportId, userId);
220220
if (report) {
221-
report.processingStatus = ProcessingStatus.UNPROCESSED; // Could add a FAILED status in the enum if needed
221+
report.processingStatus = ProcessingStatus.FAILED;
222222
report.updatedAt = new Date().toISOString();
223223
await this.reportsService.updateReport(report);
224224
}

backend/src/reports/models/report.model.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export enum ProcessingStatus {
99
PROCESSED = 'processed',
1010
UNPROCESSED = 'unprocessed',
1111
IN_PROGRESS = 'in_progress',
12+
FAILED = 'failed',
1213
}
1314

1415
export class Report {

0 commit comments

Comments
 (0)