[HttpClient] RetryableHttpClient sends to RetryStrategyInterface::getDelay always empty $responseContent #53723
-
Symfony version(s) affected5.4.31 DescriptionWhen using That means when I get response with http code 429 and response content "The rate limit for this resource is 300/minute. Please try again in 35 seconds" then I'm unable to make custom retry strategy that parses response content and output delay of 35 seconds. If I try to read How to reproduceI don't know how to test it easier. Possible SolutionNo response Additional ContextNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
IIRC, you need to make your strategy return null when shouldRetry is called with a null responseContent. |
Beta Was this translation helpful? Give feedback.
IIRC, you need to make your strategy return null when shouldRetry is called with a null responseContent.
Then, getDelay will receive the content as expected.