You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using an azure object store configured with an invalid access key, attempting to use the store will result in a panic.
To Reproduce
Example:
use object_store::azure::MicrosoftAzureBuilder;use object_store::{path::Path,ObjectStore};#[tokio::main]asyncfnmain(){let store = MicrosoftAzureBuilder::new().with_account("my_account").with_container_name("my_container").with_access_key("invalid").build().unwrap();let path = &Path::parse("/my_path").unwrap();let _res = store.get(&path).await;}
Results in a panic during the get:
thread 'main' panicked at /Users/sean/.cargo/registry/src/index.crates.io-6f17d22bba15001f/object_store-0.7.1/src/azure/credential.rs:189:56:
called `Result::unwrap()` on an `Err` value: InvalidPadding
Expected behavior
No panic and instead an error gets returned.
The easy fix is to just propagate the error up from here:
Describe the bug
When using an azure object store configured with an invalid access key, attempting to use the store will result in a panic.
To Reproduce
Example:
Results in a panic during the
get
:Expected behavior
No panic and instead an error gets returned.
The easy fix is to just propagate the error up from here:
arrow-rs/object_store/src/azure/credential.rs
Lines 170 to 182 in 03d0505
Additional context
Our use case is we configure object stores based on user provided values, and so a panic when provided with an invalid value is undesirable.
The text was updated successfully, but these errors were encountered: