Handle Timeout and SocketError exceptions for RestClient properly