Use the GitLab's retry_transient_errors flag
It is widely used in this tool the retry
decorator from tenacity
library. Better than this is to use a flag when create the GitLab object to manage transient errors.
Then, with this flag, the retries will be logged as errors to help identify if this dependency is still required.