Skip to content

Conversation

@Eduard-Voiculescu
Copy link

Context

The current implementation when calling RequestConfig.Execute will eventually call the handler which downstream calls the Do method on the httpClient.

This is called multiple times as we loop over the retries. In this below case, we will shadow the err. This can causes issues as we are shadowing the err from the handler.

if cfg.Request.GetBody != nil {
	cfg.Request.Body, err = cfg.Request.GetBody()
	if err != nil {
		return err
	}
}

This PR introduces a var connErr error which is set on each call of a retry. At the end, if there is an issue, we return the connErr

@Eduard-Voiculescu Eduard-Voiculescu requested a review from a team as a code owner November 26, 2025 23:07
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.

1 participant