MCPcopy Create free account
hub / github.com/dropbox/dbxcli / isTooManyWriteOperationsError

Function isTooManyWriteOperationsError

cmd/retry.go:65–91  ·  view source on GitHub ↗
(err error)

Source from the content-addressed store, hash-verified

63}
64
65func isTooManyWriteOperationsError(err error) bool {
66 var uploadErr files.UploadAPIError
67 if errors.As(err, &uploadErr) && uploadErr.EndpointError != nil {
68 endpointErr := uploadErr.EndpointError
69 if endpointErr.Tag == files.UploadErrorPath &&
70 endpointErr.Path != nil &&
71 endpointErr.Path.Reason != nil &&
72 endpointErr.Path.Reason.Tag == files.WriteErrorTooManyWriteOperations {
73 return true
74 }
75 }
76
77 var finishErr files.UploadSessionFinishAPIError
78 if errors.As(err, &finishErr) && finishErr.EndpointError != nil {
79 endpointErr := finishErr.EndpointError
80 if endpointErr.Tag == files.UploadSessionFinishErrorTooManyWriteOperations {
81 return true
82 }
83 if endpointErr.Tag == files.UploadSessionFinishErrorPath &&
84 endpointErr.Path != nil &&
85 endpointErr.Path.Tag == files.WriteErrorTooManyWriteOperations {
86 return true
87 }
88 }
89
90 return false
91}
92
93func retryDelay(err error, backoff time.Duration) (time.Duration, bool) {
94 var rateLimitErr auth.RateLimitAPIError

Callers 1

isTransientErrorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected