Multiple option error middleware