Failed queries to the rest server are retried until they succeed (up to a maximum)