This is an automated email from the ASF dual-hosted git repository. pcmoritz pushed a commit to branch s3-errors-http-codes in repository https://gitbox.apache.org/repos/asf/arrow.git
commit 792a5b16df01486e826e52274447c2d9f4232a7b Author: Philipp Moritz <[email protected]> AuthorDate: Thu Sep 1 01:46:45 2022 -0700 Show http status codes for S3 errors --- cpp/src/arrow/filesystem/s3_internal.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cpp/src/arrow/filesystem/s3_internal.h b/cpp/src/arrow/filesystem/s3_internal.h index 0943037aef..a0e45ed8ad 100644 --- a/cpp/src/arrow/filesystem/s3_internal.h +++ b/cpp/src/arrow/filesystem/s3_internal.h @@ -154,8 +154,9 @@ Status ErrorToStatus(const std::string& prefix, const std::string& operation, // https://sdk.amazonaws.com/cpp/api/LATEST/namespace_aws_1_1_s3.html#ae3f82f8132b619b6e91c88a9f1bde371 return Status::IOError( prefix, "AWS Error ", - S3ErrorToString(static_cast<Aws::S3::S3Errors>(error.GetErrorType())), " during ", - operation, " operation: ", error.GetMessage()); + S3ErrorToString(static_cast<Aws::S3::S3Errors>(error.GetErrorType())), + " (http status code: ", static_cast<int>(error.GetResponseCode()), ")", + " during ", operation, " operation: ", error.GetMessage()); } template <typename ErrorType, typename... Args>
