Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions reference/configuration/framework.rst
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,9 @@ will automaticaly retry failed HTTP requests.
retry_failed:
# backoff_service: app.custom_backoff
# decider_service: app.custom_decider
http_codes: [429, 500]
http_codes:
429: true
500: ['GET', 'HEAD']
max_retries: 2
delay: 1000
multiplier: 3
Expand Down Expand Up @@ -953,13 +955,13 @@ value must use the format ``['header-name' => header-value, ...]``.
http_codes
..........

**type**: ``array`` **default**: ``[423, 425, 429, 500, 502, 503, 504, 507, 510]``
**type**: ``array`` **default**: ``[0, 423, 425, 429, 500: ['GET', 'HEAD', 'PUT', 'DELETE', 'OPTIONS', 'TRACE'], 502, 503, 504: ['GET', 'HEAD', 'PUT', 'DELETE', 'OPTIONS', 'TRACE'], 507: ['GET', 'HEAD', 'PUT', 'DELETE', 'OPTIONS', 'TRACE'], 510: ['GET', 'HEAD', 'PUT', 'DELETE', 'OPTIONS', 'TRACE']]``

.. versionadded:: 5.2

The ``http_codes`` option was introduced in Symfony 5.2.

The list of HTTP status codes that triggers a retry of the request.
The list of HTTP status codes that triggers a retry of the request. You can pass a method(s) option after a HTTP status code to only retry a request on certain method(s).

http_version
............
Expand Down