rkondakov opened a new issue, #3820:
URL: https://github.com/apache/iceberg-rust/issues/3820
### Apache Iceberg Rust version
main (f38775a89)
### Describe the bug
When the REST catalog answers a table commit with 409 Conflict,
RestSessionCatalog::update_table returns a fixed error and never reads the
response body. The server's ErrorResponse says why the commit was refused, for
example which requirement failed or that a sequence number was rejected, but
none of it reaches the caller. Every conflict looks the same:
```
CatalogCommitConflicts => CatalogCommitConflicts, one or more requirements
failed. The client may retry.
```
A caller can't tell a branch that moved from a schema that changed, and
can't log the server's reason. The multi-table commit in #3398 handles 409 the
same way.
### To Reproduce
1. Commit a transaction through RestCatalog (for example a property update
via Transaction::commit) with commit.retry.num-retries = 0.
2. Have the server answer the POST to /v1/namespaces/{ns}/tables/{table}
with:
```
HTTP 409
{"error": {"message": "Requirement failed: branch main has changed", "type":
"CommitFailedException", "code": 409}}
```
3. The returned error contains neither the message nor the type.
### Expected behavior
The error keeps kind CatalogCommitConflicts and stays retryable, and carries
the server's message and type, e.g.:
```
CatalogCommitConflicts, context: { message: Requirement failed: branch main
has changed, type: CommitFailedException } => CatalogCommitConflicts, one or
more requirements failed. The client may retry.
```
An empty or unparseable body should give the same error as today.
### Willingness to contribute
I can contribute a fix for this bug independently
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]