Retry transient failures in the Dotfile driver

The Square, Segment and Google Analytics drivers all wrap their transport
with retryRoundTripper for flaky 5xx responses, but the Dotfile driver used
the client directly. Wrap it the same way so all four connectors handle
transient upstream failures consistently.

Signed-off-by: Aurélien Sibiril <81782+aureliensibiril@users.noreply.github.com>
This commit is contained in:
Aurélien Sibiril
2026-07-12 19:54:25 +02:00
parent b6b16cf504
commit e4c5848759

View File

@@ -65,7 +65,14 @@ type dotfileUsersResponse struct {
}
func NewDotfileDriver(httpClient *http.Client) *DotfileDriver {
return &DotfileDriver{httpClient: httpClient}
return &DotfileDriver{
httpClient: &http.Client{
Transport: &retryRoundTripper{
next: httpClient.Transport,
maxRetries: 3,
},
},
}
}
func (d *DotfileDriver) ListAccounts(ctx context.Context) ([]AccountRecord, error) {