Skip to content

Conversation

@antgilles
Copy link
Contributor

Issue :

Retry strategy is not working correctly on go client probably since version 4.
After an http error 502 on the first try. The next attempts to reach fallback host are failing with this error :

> ALGOLIA DEBUG: do not know how to display &url.Error{Op:"Post", URL:"https://CTIR4UHXJG-2.algolianet.com/1/indexes/test_index/query?hitsPerPage=1", Err:http.nothingWrittenError{error:(*errors.errorString)(0xc000628ad0)}}
took 8.799µs
cannot perform request:
	error=Post "https://CTIR4UHXJG-2.algolianet.com/1/indexes/test_index/query?hitsPerPage=1": http: ContentLength=13 with Body length 0
	method=POST

FIX :

Use req.GetBody function to recreate the request body when needed for retry strategy

@github-actions
Copy link

Thanks for contributing to our API clients! Sorry to close your PR, but this repository is fully generated, you can port your changes to the API Clients Automation repository. If you need some guidance, feel free to open an issue or read our contribution guide.

@github-actions github-actions bot closed this Jul 24, 2025
@github-actions github-actions bot deleted the fix/transport-retry-strategy branch July 24, 2025 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants