laws-africa / peachjam

Project Peach Jam
https://agp.africanlii.org
GNU General Public License v3.0
2 stars 0 forks source link

HTTPError: 404 Client Error: Not Found for url: https://api.laws.africa/v3/akn/ci/act/instructions/1962/31/m... #1890

Closed sentry-io[bot] closed 1 week ago

sentry-io[bot] commented 1 week ago

Sentry Issue: LII-1KS

HTTPError: 404 Client Error: Not Found for url: https://api.laws.africa/v3/akn/ci/act/instructions/1962/31/media/publication/ci-act-2013-654-publication-document.pdf
(2 additional frame(s) were not displayed)
...
  File "peachjam/tasks.py", line 72, in update_document
    ingestor.update_document(document_id)
  File "peachjam/models/ingestors.py", line 62, in update_document
    adapter.update_document(document_id)
  File "peachjam/adapters/indigo.py", line 294, in update_document
    self.download_source_file(pubdoc["url"], created_doc, title)
  File "peachjam/adapters/indigo.py", line 494, in download_source_file
    r = self.client_get(url)
  File "peachjam/adapters/indigo.py", line 467, in client_get
    r.raise_for_status()
actlikewill commented 1 week ago

@longhotsummer this looks like a publication document from a gazettes.africa thats not working, maybe someone is using old urls https://lawsafrica.sentry.io/issues/5462860236/events/7a957960df16404dbf0d96fdaee64506/ in any case, i'm adding code to ignore 404 errors

longhotsummer commented 1 week ago

fixed by cleaning up dirty data.