Handle Http request errors.