datamade / django-councilmatic

:heartpulse: Django app providing core functions for *.councilmatic.org
http://councilmatic.org
MIT License
26 stars 16 forks source link

Show the Person detail view - even with data errors #183

Open reginafcompton opened 6 years ago

reginafcompton commented 6 years ago

Recently, we had a data issue that raised a Bill DoesNotExist error when arriving at this query. (N.B. The data problem was that a sponsorship pointed to a bill ocd_id, which no longer resided in the data base.)

These types of data problems can, do, and will happen. However, we should not let them bring down the entire Person view (in this case: that of the Mayor). Let's handle this error so that: (1) the Person view still renders, and (2) Councilmatic logs a message to Sentry, warning us of the data trouble.

hancush commented 6 years ago

I believe this is the issue in question: https://sentry.io/datamade/chicago-councilmatic/issues/476354390/ (cc @fgregg, as we were looking at this during ops yesterday).