Added exception handler for httpclient