Skip to content

Commit

Permalink
fix(RECAP_api): Update error message for RECAPDocument save failures
Browse files Browse the repository at this point in the history
- Refined error message to reflect possible causes, including unique constraint violations or document type validation issues.
  • Loading branch information
elisa-a-v committed Nov 18, 2024
1 parent 1c6a5f8 commit 15c91bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cl/recap/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ async def process_recap_pdf(pk):
try:
await rd.asave()
except (IntegrityError, ValidationError):
msg = "Duplicate key on unique_together constraint"
msg = "Failed to save RECAPDocument (unique_together constraint or doc type issue)"
await mark_pq_status(pq, msg, PROCESSING_STATUS.FAILED)
rd.filepath_local.delete(save=False)
return None
Expand Down

0 comments on commit 15c91bf

Please sign in to comment.