carlsverre commented on code in PR #580:
URL: 
https://github.com/apache/arrow-rs-object-store/pull/580#discussion_r2632250149


##########
src/client/retry.rs:
##########
@@ -122,7 +122,10 @@ pub enum RequestError {
     #[error("Server returned error response: {body}")]
     Response { status: StatusCode, body: String },
 
-    #[error(transparent)]
+    // We need to use `{0}` here rather than `error(transparent)` to ensure 
that
+    // `Error::source` returns `HttpError` rather than the underlying
+    // `reqwest::Error` which would happen with `error(transparent)`.
+    #[error("{0}")]

Review Comment:
   Yea, perhaps the thiserror docs could be a bit better. I think it's somewhat 
of a footgun that `source` is also transparently forwarded, which effectively 
means the embedded `#[from] Foo` is no longer accessible via recursively 
searching source.
   
   Nice to see you too!



-- 
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]

Reply via email to