is_conflict
Function: warmhub.is_conflict
is_conflict(error: object)Whether error is a lost race: re-read, re-apply, retry.
True for CONFLICT and PRECONDITION_FAILED. When the backend sent
structured details, expected_version and
current_version say which versions disagreed:
try: repo.batch().revise(name=n, data=d, expected_version=v).commit()except WarmHubError as err: if not is_conflict(err): raise current = err.current_version # None if the backend sent no details ...