Adds http request error handling
Merge pull request #10 from dettier/master

Adds http request error handling