Some basic error handling for HTTP responses