jorisvandenbossche commented on code in PR #14601:
URL: https://github.com/apache/arrow/pull/14601#discussion_r1022536661


##########
cpp/src/arrow/filesystem/s3_internal.h:
##########
@@ -158,6 +170,13 @@ Status ErrorToStatus(const std::string& prefix, const 
std::string& operation,
   if (error_type == Aws::S3::S3Errors::UNKNOWN) {
     ss << " (HTTP status " << static_cast<int>(error.GetResponseCode()) << ")";
   }
+  const auto maybe_region = BucketRegionFromError(error);
+  if (maybe_region.has_value() && region.has_value()) {
+    if (maybe_region.value() != region.value()) {
+      ss << " Looks like the configured region is '" + region.value() +

Review Comment:
   Could we add this additional context fully at the end of the error message? 
   
   Right now the AWS part gives something like "AWS Error UNKNOWN (HTTP status 
301) during HeadObject operation: No response body.", which sounds like a 
logical sentence, and this additional sentence is adding there somewhere in the 
middle.



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