Trap search exceptions early so we still have some sort of working UI when errors occur.