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.
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.