Added error messages and proxy for rest call