this doesn't seem like a scalable solution, what happens when you put another error in here?

i think it would be better to register a series of error handlers and iterate through them.