Use object literal instead of switch case for error message.

still need to address getting to that function in a prettier
way...