I created one Person entity with attributes id, name.
and created Personrepository extending CrudRepository, having findByName method.

So if i search by name I'm getting values
But if I'm searching with id, it is giving 500 Internal server error.

Is there any way that I can get 400 or 406 errors instead of 500.

Any ideas please share. Thanks