From 22c78050dd5ccae375de1e47284f0e4668594f58 Mon Sep 17 00:00:00 2001 From: Itay Etelis <92247226+Etelis@users.noreply.github.com> Date: Wed, 18 Sep 2024 23:48:10 +0300 Subject: [PATCH] docs: Clarify default_retry_on retry behavior for exceptions (#1754) * docs: Clarify exceptions retried by default_retry_on in retry policy tutorial - Added a remark in the tutorial explaining that the `default_retry_on` function retries on any exception except for the following: - ValueError - TypeError - ArithmeticError - ImportError - LookupError - NameError - SyntaxError - RuntimeError - ReferenceError - StopIteration - StopAsyncIteration - OSError * http status codes --------- Co-authored-by: Itay Etelis Co-authored-by: isaac hershenson --- docs/docs/how-tos/node-retries.ipynb | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/docs/how-tos/node-retries.ipynb b/docs/docs/how-tos/node-retries.ipynb index 929b76984..3616297c9 100644 --- a/docs/docs/how-tos/node-retries.ipynb +++ b/docs/docs/how-tos/node-retries.ipynb @@ -82,6 +82,28 @@ "RetryPolicy()" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "By default, the `retry_on` parameter uses the `default_retry_on` function, which retries on any exception except for the following:\n", + "\n", + "* `ValueError`\n", + "* `TypeError`\n", + "* `ArithmeticError`\n", + "* `ImportError`\n", + "* `LookupError`\n", + "* `NameError`\n", + "* `SyntaxError`\n", + "* `RuntimeError`\n", + "* `ReferenceError`\n", + "* `StopIteration`\n", + "* `StopAsyncIteration`\n", + "* `OSError`\n", + "\n", + "In addition, for exceptions from popular http request libraries such as `requests` and `httpx` it only retries on 5xx status codes." + ] + }, { "cell_type": "markdown", "metadata": {},