Exception handling for REST web services at the client side.
I have a rest service like,
if loadUserByEmail finds a user with email@example.com it returns the user.
Otherwise, this method throws UserNotFoundException.
So, when I type the above URL in browser, I could see, either User Info or Exception Message.
Can anyone please tell me how to extract that exception message when I call the service Using RestTemplate?
What I am geting is 401 response code.. But I could not extract the message..