BUG: allow get default value upon IndexError, GH #7725

Fixes #7725 by adding IndexError to the tuple of caught exceptions.