added hibernate exception handling and the appropriate http status responses