From 295f0261780f779662ee624b27abb2ae346eee86 Mon Sep 17 00:00:00 2001 From: Tigran Najaryan Date: Wed, 12 Feb 2025 12:18:27 -0500 Subject: [PATCH] Clarify client behavior for 502 and 504 response codes The spec previously said that the client should retry if 502 or 504 response is received. However, it was not specified what retry strategy should be used if Retry-After header is missing. The spec now says that the behavior when Retry-After is missing is the same for all 4 expected codes: 429,502,503,504. --- docs/specification.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/specification.md b/docs/specification.md index 976cf42d..de2744ba 100644 --- a/docs/specification.md +++ b/docs/specification.md @@ -591,8 +591,9 @@ overloaded, the server SHOULD respond with `HTTP 429 Too Many Requests` or recommended time interval in seconds to wait before retrying. The client SHOULD honour the waiting interval specified in the "Retry-After" -header if it is present. If the client receives an `HTTP 429` or an `HTTP 503` -response and the "Retry-After" header is not present in the response, then the +header if it is present. If the client receives a retryable error code +`HTTP 429`, `HTTP 502`, `HTTP 503` or `HTTP 504` +and the "Retry-After" header is not present in the response, then the client SHOULD implement an exponential backoff strategy between retries. ##### All Other Responses