What about using each value of the handlers be a tuple with the function to call and the error message?