Most of the 500 errors regulations-site generates from two places and are generally either TypeErrors or IndexErrors. This PR wraps those two places in a try/except and throws a 404 when they’re encountered.
Additionally, we sometimes see a KeyError in the 404 error handling view. That is fixed here as well.
Most of the 500 errors regulations-site generates from two places and are generally either
TypeError
s orIndexError
s. This PR wraps those two places in atry
/except
and throws a 404 when they’re encountered.Additionally, we sometimes see a
KeyError
in the 404 error handling view. That is fixed here as well.