alamb commented on code in PR #3274: URL: https://github.com/apache/arrow-rs/pull/3274#discussion_r1039619979
########## object_store/src/aws/credential.rs: ########## @@ -477,11 +477,14 @@ impl From<AssumeRoleCredentials> for AwsCredential { async fn web_identity( client: &Client, retry_config: &RetryConfig, - token: &str, + token_path: &str, role_arn: &str, session_name: &str, endpoint: &str, ) -> Result<TemporaryToken<Arc<AwsCredential>>, StdError> { + let token = std::fs::read_to_string(token_path) + .map_err(|e| format!("Failed to read token file: {}", e))?; Review Comment: I recommend putting the token path in the message as well (I hate errors that say "couldn't read file" but don't tell me what file they couldn't read!!!!) ```suggestion .map_err(|e| format!("Failed to read token file '{}': {}", token_path, e))?; ``` -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org