Raise correct error in one of the little javascript views I'm trying to
refactor anyways