Added exceptions to RestClient.