freelawproject / courtlistener

A fully-searchable and accessible archive of court data including growing repositories of opinions, oral arguments, judges, judicial financial records, and federal filings.
https://www.courtlistener.com
Other
550 stars 151 forks source link

feat(RECAPDocument): Validate attachment number against document type #4703

Closed elisa-a-v closed 2 days ago

elisa-a-v commented 3 days ago

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.

sentry-io[bot] commented 2 days ago

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

Did you find this useful? React with a 👍 or 👎