Better exception handling for HttpClient

Better exception handling for HttpClient

#15