ncw / swift

Go language interface to Swift / Openstack Object Storage / Rackspace cloud files (golang)
MIT License
310 stars 107 forks source link

No support for rate-limit errors with retry-after headers. #174

Open axiserik opened 2 years ago

axiserik commented 2 years ago

When receiving errors for creating/updating objects/containers the headers are thrown away, this makes it impossible to respect retry-after headers which can be present in e.g. http 503 Service Unavailable or 429 Too many requests. (Unless Ḯm missing something obvious?) A possible non breaking solution would be to add an optional field "Headers" to swift.Error and append headers to this error. Another solution which would be breaking could be to simply return both error and headers from ObjectUpdate etc.