Skip to content

Commit f749e25

Browse files
authored
docs(http-client): fix default retry_failed configuration example
The framework bundle configuration validation requires the top-level http client retry_failed configuration to be nested under default_options or scoped_clients. See: https://github.com/symfony/framework-bundle/blob/1f977bb1b790f915b22462e511b039fb761280b3/DependencyInjection/Configuration.php#L1414
1 parent 337a76d commit f749e25

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

reference/configuration/framework.rst

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -831,17 +831,18 @@ will automatically retry failed HTTP requests.
831831
# ...
832832
http_client:
833833
# ...
834-
retry_failed:
835-
# retry_strategy: app.custom_strategy
836-
http_codes:
837-
0: ['GET', 'HEAD'] # retry network errors if request method is GET or HEAD
838-
429: true # retry all responses with 429 status code
839-
500: ['GET', 'HEAD']
840-
max_retries: 2
841-
delay: 1000
842-
multiplier: 3
843-
max_delay: 5000
844-
jitter: 0.3
834+
default_options:
835+
retry_failed:
836+
# retry_strategy: app.custom_strategy
837+
http_codes:
838+
0: ['GET', 'HEAD'] # retry network errors if request method is GET or HEAD
839+
429: true # retry all responses with 429 status code
840+
500: ['GET', 'HEAD']
841+
max_retries: 2
842+
delay: 1000
843+
multiplier: 3
844+
max_delay: 5000
845+
jitter: 0.3
845846
846847
scoped_clients:
847848
my_api.client:

0 commit comments

Comments
 (0)