restClient updated with try and catch on the callback and other validations