freelawproject / recap

This repository is for filing issues on any RECAP-related effort.
https://free.law/recap/
12 stars 4 forks source link

No docket number sent with appellate docket upload #348

Open sentry-io[bot] opened 11 months ago

sentry-io[bot] commented 11 months ago

Sentry Issue: COURTLISTENER-4JA

ValidationError: ["'docket_number' cannot be Null or empty in RECAP dockets."]
(23 additional frame(s) were not displayed)
...
  File "cl/recap/views.py", line 56, in perform_create
    await process_recap_upload(pq)
  File "cl/recap/tasks.py", line 118, in process_recap_upload
    docket = await process_recap_appellate_docket(pq.pk)
  File "cl/recap/tasks.py", line 969, in process_recap_appellate_docket
    await d.asave()
  File "asyncio/tasks.py", line 442, in wait_for
    return await fut
  File "cl/search/models.py", line 701, in save
    raise ValidationError(
ERosendo commented 11 months ago

I reviewed this issue and found the AppellateDocketReport class is failing to parse the docket_number because Mobile Safari is wrapping the string with anchor tags. It seems like this browser automatically creates links for strings of digits that look like telephone numbers.

The docket number in the HTML uploaded from Mobile Safari looks like this:

<td>
<b>Court of Appeals Docket #: </b>
<a href="tel:22-10782">22-10782</a>
</td>

While the same page looks like this on Chrome:

<td>
<b>Court of Appeals Docket #: </b>
22-10782
</td> 

Here's a zip with the HTML pages:

Docket 22-10782.zip

mlissner commented 11 months ago

Ugh. Ridiculous.