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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user