Nit: seems like the console.error() in the single original failure case should be copied into _both_ of the new failure cases.