alamb commented on code in PR #6158:
URL: https://github.com/apache/arrow-rs/pull/6158#discussion_r1699078203
##########
object_store/src/client/retry.rs:
##########
@@ -30,21 +30,32 @@ use tracing::info;
/// Retry request error
#[derive(Debug, Snafu)]
pub enum Error {
+ /// The response sent by the cloud provider was a redirect without a
Review Comment:
I think keeping the underlying error opaque is pretty hard to use and
clearly there appears to be a need to get finer grained information about what
the error was
>Otherwise it is going to be very hard to evolve this without introducing
breaking changes
Perhaps another possibility is to mark it as `[#non_exhaustive]`
https://doc.rust-lang.org/reference/attributes/type_system.html
> If we do this I think we should make the variants opaque, and expose
information with accessors.
Are you suggesting something like
```rust
impl Error {
fn is_redirect(&self) -> bool {..}
fn status_code(&self) -> Option<StatusCode> {..}
...
}
```
--
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]