[BZ-1077834] raising the legacy consequence exception instead of the new one

(cherry picked from commit bc589ddc3abde764d48b5b56708305ed9a511a6f)