Retry when we get a "500 Internal server error".
It seems like this happens randomly, and retrying works fine for that.
This commit is contained in:
parent
f1226f19b2
commit
6ac7145d2d
1 changed files with 5 additions and 1 deletions
|
@ -129,10 +129,14 @@ func shouldRetry(resp *http.Response, err error) (bool, error) {
|
||||||
if err != nil && resp != nil && resp.StatusCode == 429 {
|
if err != nil && resp != nil && resp.StatusCode == 429 {
|
||||||
return true, err
|
return true, err
|
||||||
}
|
}
|
||||||
|
// Retry on occasional 500 Internal Server Error
|
||||||
|
if err != nil && resp != nil && resp.StatusCode == 500 {
|
||||||
|
return true, err
|
||||||
|
}
|
||||||
return false, err
|
return false, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewFs contstructs an FsAcd from the path, container:path
|
// NewFs constructs an FsAcd from the path, container:path
|
||||||
func NewFs(name, root string) (fs.Fs, error) {
|
func NewFs(name, root string) (fs.Fs, error) {
|
||||||
root = parsePath(root)
|
root = parsePath(root)
|
||||||
oAuthClient, err := oauthutil.NewClient(name, acdConfig)
|
oAuthClient, err := oauthutil.NewClient(name, acdConfig)
|
||||||
|
|
Loading…
Reference in a new issue