Added an exception for HTTP errors.