logic added to deal with Twitter errors.