Files
email-tracker/external/duckdb/.github/patches/extensions/httpfs/fix.patch
2025-10-24 19:21:19 -05:00

39 lines
1.8 KiB
Diff

diff --git a/src/s3fs.cpp b/src/s3fs.cpp
index 72eddc3..601ecba 100644
--- a/src/s3fs.cpp
+++ b/src/s3fs.cpp
@@ -895,7 +895,7 @@ void S3FileHandle::Initialize(optional_ptr<FileOpener> opener) {
correct_region = new_region->second;
}
auto extra_text = S3FileSystem::GetS3BadRequestError(auth_params, correct_region);
- throw Exception(error.Type(), error.RawMessage() + extra_text, extra_info);
+ throw Exception(extra_info, error.Type(), error.RawMessage() + extra_text);
}
if (entry->second == "403") {
// 403: FORBIDDEN
@@ -905,7 +905,7 @@ void S3FileHandle::Initialize(optional_ptr<FileOpener> opener) {
} else {
extra_text = S3FileSystem::GetS3AuthError(auth_params);
}
- throw Exception(error.Type(), error.RawMessage() + extra_text, extra_info);
+ throw Exception(extra_info, error.Type(), error.RawMessage() + extra_text);
}
}
throw;
@@ -941,13 +941,13 @@ bool S3FileSystem::CanHandleFile(const string &fpath) {
void S3FileSystem::RemoveFile(const string &path, optional_ptr<FileOpener> opener) {
auto handle = OpenFile(path, FileFlags::FILE_FLAGS_NULL_IF_NOT_EXISTS, opener);
if (!handle) {
- throw IOException("Could not remove file \"%s\": %s", {{"errno", "404"}}, path, "No such file or directory");
+ throw IOException({{"errno", "404"}}, "Could not remove file \"%s\": %s", path, "No such file or directory");
}
auto &s3fh = handle->Cast<S3FileHandle>();
auto res = DeleteRequest(*handle, s3fh.path, {});
if (res->status != HTTPStatusCode::OK_200 && res->status != HTTPStatusCode::NoContent_204) {
- throw IOException("Could not remove file \"%s\": %s", {{"errno", to_string(static_cast<int>(res->status))}},
+ throw IOException({{"errno", to_string(static_cast<int>(res->status))}}, "Could not remove file \"%s\": %s",
path, res->GetError());
}
}