Fix bug 1055653: handle exceptions from RestClient