milesgranger commented on code in PR #14601:
URL: https://github.com/apache/arrow/pull/14601#discussion_r1026209688
##########
cpp/src/arrow/filesystem/s3_internal.h:
##########
@@ -158,8 +170,20 @@ 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()) << ")";
}
+
+ // Possibly an error due to wrong region configuration from client and
bucket.
+ std::optional<std::string> wrong_region_msg = std::nullopt;
+ if (region.has_value()) {
+ const auto maybe_region = BucketRegionFromError(error);
Review Comment:
Thanks! Added in
https://github.com/apache/arrow/pull/14601/commits/34a49760010c5a6c6e5c3c31bcb0a05d90b26648,
but then as someone new to C++, is it just as good to combine them with a
`constexpr` as in
https://github.com/apache/arrow/pull/14601/commits/23f8fe72d8003a17ef59500aa0ea574a6c59fb01?
I have no real opinion, but curious if performance or style/standard has one.
--
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]