Added exception if is not set the the REST client
Generalization of behaviour, when REST data is return checks response status and throw exception on error