alamb commented on code in PR #929:
URL:
https://github.com/apache/arrow-rs-object-store/pull/929#discussion_r4803773438
##########
src/aws/client.rs:
##########
@@ -131,6 +132,16 @@ impl From<Error> for crate::Error {
match err {
Error::CompleteMultipartRequest { source, path } =>
source.error(STORE, path),
Error::DeleteObjectsRequest { source, paths } =>
source.error(STORE, paths.join(",")),
+ Error::DeleteFailed {
+ ref path, ref code, ..
+ } if is_throttle_code(code) => Self::Throttled {
Review Comment:
why is this testing only DeleteFailed? Why not check is_throttle_code for
the other errors too?
##########
src/lib.rs:
##########
@@ -2358,6 +2368,22 @@ pub enum Error {
source: Box<dyn std::error::Error + Send + Sync + 'static>,
},
+ /// Error when the object store explicitly asks the caller to reduce its
+ /// request rate and the request completes without success.
+ ///
+ /// This includes HTTP 429 and structured provider throttle responses. A
+ /// bodyless HTTP 503 remains a generic error because it carries no
explicit
+ /// throttle signal.
+ #[error("The object store throttled the request for path {}: {}", path,
source)]
Review Comment:
Since this enum is `#[non_exhaustive]` adding a new error variant like this
is not a breaking API change and we can release it in a patch release
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]