Changed internal server error to bad request
Validation check in model