added error handlers for model validation