Closed elisa-a-v closed 2 days ago
This pull request was deployed and Sentry observed the following issues:
/api/rest/{version}/recap/
View Issuecl.corpus_importer.tasks.upload_pdf_to_ia
View Issuecl.corpus_importer.tasks.upload_pdf_to_ia
View IssueDid you find this useful? React with a 👍 or 👎
Resolves #3982
This PR adds a model-wide validation for the RECAPDocument model that checks that:
It also fixes an issue where previously empty RECAPDocuments didn't have their document_type updated, so if the
rd
was an attachment, the attachment number was added but the document type remained as a main PACER document. We now update the document type every time, so this should not happen again.Given the nature of the changes, we're now logging errors in several places for future troubleshooting, and a new sentry setting was added which enables attaching the entire stack trace to sentry logs.
this also adds tests and updates docs to reflect changes.