ychampion opened a new pull request, #940:
URL: https://github.com/apache/arrow-rs-object-store/pull/940
# Which issue does this PR close?
Closes #851.
# Rationale for this change
`Error::ListRequest` in the S3, GCS, and Azure clients fell through to the
wildcard arm of `From<Error> for crate::Error`, turning HTTP 401/403/404
responses into `Error::Generic` instead of mapping them through
`RetryError::error` like `get`, `head`, `put`, and `delete` requests.
# What changes are included in this PR?
- Add `path: String` (populated from
`prefix.unwrap_or_default().to_string()`) to `Error::ListRequest` and delegate
`Error::ListRequest { source, path } => source.error(STORE, path)` in
`From<Error> for crate::Error` for:
- `src/aws/client.rs`
- `src/gcp/client.rs`
- `src/azure/client.rs`
- Add `MockServer` unit tests for S3, GCS, and Azure covering `list` and
`list_with_delimiter` across HTTP 403 (`PermissionDenied`), 404 (`NotFound`),
401 (`Unauthenticated`), and 500 (`Generic`), checking the reported error path
for both prefixed and unprefixed requests.
*Disclosure: AI assistance was used to draft the implementation, tests, and
PR summary; all changes and test runs were reviewed and verified locally.*
# Are there any user-facing changes?
S3, GCS, and Azure list requests now return typed `object_store::Error`
variants (`PermissionDenied`, `NotFound`, `Unauthenticated`, `NotModified`,
`AlreadyExists`, `Precondition`) via `RetryError::error` instead of
`Error::Generic`, matching `get`/`head`/`put`/`delete`. Unmapped status codes
(e.g. 500) continue to return `Error::Generic`.
--
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]