add error handler
add some input validation errors