apache / apache/arrow-rs-object-store
`resolve_bucket_region` should not hide root cause of requests failing
- Dominant language
- Rust
- Stars
- 322
- Forks
- 212
- Avg merge
- 5d 2h
- Merged PRs (30d)
- 10
Description
**Is your feature request related to a problem or challenge? Please describe what you are trying to do.**
I am getting the error `Failed to resolve region for bucket 'mybucket'` but I cannot see the root cause for the request failing.
After making code changes and debugging this, I found that the root cause was an `InvalidCertificate`. It took a long time to debug this and it would be better if we could expose the root cause.
```rust
#[error("Failed to resolve region for bucket '{}'", bucket)]
ResolveRegion {
bucket: String,
source: reqwest::Error,
},
```
**Describe the solution you'd like**
Either include the root cause in the error message, or make the root cause accessible via API somehow.
**Describe alternatives you've considered**
**Additional context**
Contributor guide
Research direction
Start at the resolve_bucket_region entry point and inspect the ResolveRegion error variant shown in the issue, including how its source is currently handled. Determine whether the request cause should appear in the error message or remain accessible through the error API, then verify that failures such as InvalidCertificate preserve that cause.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100