Add proper error handling for HTTP requests

Now you know why you botched up!