Skip to content

Commit 182cb18

Browse files
committed
GH-47349: [C++] Include request ID in AWS S3 Error
Signed-off-by: Kit Lee <[email protected]>
1 parent 15662e6 commit 182cb18

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cpp/src/arrow/filesystem/s3_internal.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,12 @@ Status ErrorToStatus(const std::string& prefix, const std::string& operation,
189189
"'.";
190190
}
191191
}
192+
193+
auto request_id = error.GetRequestId();
194+
auto request_str = request_id.empty() ? "" : (" request ID: " + request_id);
195+
192196
return Status::IOError(prefix, "AWS Error ", ss.str(), " during ", operation,
193-
" operation: ", error.GetMessage(),
197+
" operation: ", error.GetMessage(), request_str,
194198
wrong_region_msg.value_or(""));
195199
}
196200

0 commit comments

Comments
 (0)