Skip to content

Commit

Permalink
minor symfony#15153 docs(http-client): fix default retry_failed confi…
Browse files Browse the repository at this point in the history
…guration example (KalleV)

This PR was merged into the 5.2 branch.

Discussion
----------

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

<!--

If your pull request fixes a BUG, use the oldest maintained branch that contains
the bug (see https://symfony.com/releases for the list of maintained branches).

If your pull request documents a NEW FEATURE, use the same Symfony branch where
the feature was introduced (and `5.x` for features of unreleased versions).

-->

Commits
-------

f749e25 docs(http-client): fix default retry_failed configuration example
  • Loading branch information
OskarStark committed Apr 7, 2021
2 parents b18d253 + f749e25 commit 6bd8350
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions reference/configuration/framework.rst
Original file line number Diff line number Diff line change
Expand Up @@ -831,17 +831,18 @@ will automatically retry failed HTTP requests.
# ...
http_client:
# ...
retry_failed:
# retry_strategy: app.custom_strategy
http_codes:
0: ['GET', 'HEAD'] # retry network errors if request method is GET or HEAD
429: true # retry all responses with 429 status code
500: ['GET', 'HEAD']
max_retries: 2
delay: 1000
multiplier: 3
max_delay: 5000
jitter: 0.3
default_options:
retry_failed:
# retry_strategy: app.custom_strategy
http_codes:
0: ['GET', 'HEAD'] # retry network errors if request method is GET or HEAD
429: true # retry all responses with 429 status code
500: ['GET', 'HEAD']
max_retries: 2
delay: 1000
multiplier: 3
max_delay: 5000
jitter: 0.3
scoped_clients:
my_api.client:
Expand Down

0 comments on commit 6bd8350

Please sign in to comment.