summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorNejc Habjan <nejc.habjan@siemens.com>2022-12-05 21:48:07 +0100
committerNejc Habjan <hab.nejc@gmail.com>2022-12-19 22:58:03 +0100
commit3e1c625133074ccd2fb88c429ea151bfda96aebb (patch)
treea63af76909e9d322b9d2899a34cf68b4a514455f /docs
parentdced76a9900c626c9f0b90b85a5e371101a24fb4 (diff)
downloadgitlab-3e1c625133074ccd2fb88c429ea151bfda96aebb.tar.gz
chore: add test, docs, and helper for 409 retries
Diffstat (limited to 'docs')
-rw-r--r--docs/api-usage-advanced.rst11
1 files changed, 8 insertions, 3 deletions
diff --git a/docs/api-usage-advanced.rst b/docs/api-usage-advanced.rst
index 256ae2d..dcc27ca 100644
--- a/docs/api-usage-advanced.rst
+++ b/docs/api-usage-advanced.rst
@@ -123,9 +123,14 @@ GitLab server can sometimes return a transient HTTP error.
python-gitlab can automatically retry in such case, when
``retry_transient_errors`` argument is set to ``True``. When enabled,
HTTP error codes 500 (Internal Server Error), 502 (502 Bad Gateway),
-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``
+503 (Service Unavailable), 504 (Gateway Timeout), and Cloudflare
+errors (520-530) are retried.
+
+Additionally, HTTP error code 409 (Conflict) is retried if the reason
+is a
+`Resource lock <https://gitlab.com/gitlab-org/gitlab/-/blob/443c12cf3b238385db728f03b2cdbb4f17c70292/lib/api/api.rb#L111>`__.
+
+It will retry until reaching the ``max_retries``
value. By default, ``retry_transient_errors`` is set to ``False`` and an
exception is raised for these errors.