We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent043de2d commitdced76aCopy full SHA for dced76a
docs/api-usage-advanced.rst
@@ -123,9 +123,11 @@ GitLab server can sometimes return a transient HTTP error.
123
python-gitlab can automatically retry in such case, when
124
``retry_transient_errors`` argument is set to ``True``. When enabled,
125
HTTP error codes 500 (Internal Server Error), 502 (502 Bad Gateway),
126
-503 (Service Unavailable), and 504 (Gateway Timeout) are retried. It will retry until reaching
127
-the ``max_retries`` value. By default, ``retry_transient_errors`` is set to ``False`` and an exception
128
-is raised for these errors.
+503 (Service Unavailable), and 504 (Gateway Timeout) are retried.
+Additionally the HTTP error code 409 (Conflict) is retried if the text message
+mentions "Resource lock". It will retry until reaching the ``max_retries``
129
+value. By default, ``retry_transient_errors`` is set to ``False`` and an
130
+exception is raised for these errors.
131
132
..code-block::python
133
gitlab/client.py
@@ -752,7 +752,10 @@ def http_request(
752
returnresult.response
753
754
if (429==result.status_codeandobey_rate_limit)or (
755
-result.status_codeingitlab.const.RETRYABLE_TRANSIENT_ERROR_CODES
+ (
756
+result.status_codeingitlab.const.RETRYABLE_TRANSIENT_ERROR_CODES
757
+or (result.status_code==409and"Resource lock"inresult.reason)
758
+ )
759
andretry_transient_errors
760
):
761
# Response headers documentation: