freelawproject / doctor

A microservice for document conversion at scale
https://free.law/projects/doctor
BSD 2-Clause "Simplified" License
57 stars 15 forks source link

IndexError getting PACER doc number from PDF headers #159

Closed sentry-io[bot] closed 1 year ago

sentry-io[bot] commented 1 year ago

Sentry Issue: DOCTOR-P

IndexError: list index out of range
  File "django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)
  File "django/core/handlers/base.py", line 181, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "doctor/views.py", line 350, in get_document_number
    document_number = get_document_number_from_pdf(fp)
  File "doctor/tasks.py", line 596, in get_document_number_from_pdf
    document_number = [dn for dn in document_number_matches[0] if dn]