Catch errors from http(s) request, will throw globally otherwise.

An error from the sending a request (such as a ECONNRESET), will throw a global exception.
Merge pull request #12 from grydstedt/master

Catch errors from http(s) request, will throw globally otherwise.