Skip to content

Commit ff5d830

Browse files
committed
refactor: initialize empty fields in CommitTableRequest and error response
1 parent dcf00cf commit ff5d830

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

src/iceberg/catalog/rest/http_client.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ ErrorResponse BuildDefaultErrorResponse(const cpr::Response& response) {
106106
.type = std::string(kRestExceptionType),
107107
.message = !response.reason.empty() ? response.reason
108108
: GetStandardReasonPhrase(response.status_code),
109+
.stack = {},
109110
};
110111
}
111112

src/iceberg/catalog/rest/rest_catalog.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,11 @@ Result<std::shared_ptr<Table>> RestCatalog::UpdateTable(
365365
ICEBERG_ENDPOINT_CHECK(supported_endpoints_, Endpoint::UpdateTable());
366366
ICEBERG_ASSIGN_OR_RAISE(auto path, paths_->Table(identifier));
367367

368-
CommitTableRequest request{.identifier = identifier};
368+
CommitTableRequest request{
369+
.identifier = identifier,
370+
.requirements = {},
371+
.updates = {},
372+
};
369373
request.requirements.reserve(requirements.size());
370374
for (const auto& req : requirements) {
371375
request.requirements.push_back(req->Clone());

0 commit comments

Comments
 (0)