refactored the error exception
refactored user resource test cases
added constraint mapper to bad exception