Better HTTP error handling and status checks.