Skip to content

Commit

Permalink
ignore 404s
Browse files Browse the repository at this point in the history
  • Loading branch information
longhotsummer committed Mar 1, 2024
1 parent e19838a commit 67d1717
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion peachjam/adapters/indigo.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,13 @@ def get_doc_list(self):
logger.info(f"Getting document list for {place_code}")
url = f"{self.api_url}/akn/{place_code}/.json"
while url:
res = self.client_get(url).json()
try:
res = self.client_get(url).json()
except requests.exceptions.HTTPError as e:
if e.response.status_code == 404:
logger.warning(f"Ignoring 404 for {url}")
continue
raise e

# ignore bills
# TODO: later, make this configurable
Expand Down

0 comments on commit 67d1717

Please sign in to comment.