rshdhere opened a new pull request, #18473: URL: https://github.com/apache/iceberg/pull/18473
The REST client turned every 400 response into a `BadRequestException`, so a `ValidationException` raised by the server, such as an invalid `commit.retry.num-retries` table property, reached callers as a different exception than with the Hive or Hadoop catalogs. Following #9225, which did the same for `IllegalArgumentException`, `DefaultErrorHandler` now rethrows a `ValidationException` when the error type matches. The message is passed through `%s` because `ValidationException` formats its message. This also applies to commit responses, since `CommitErrorHandler` delegates 400s; both exceptions are `CleanableFailure` and neither is retried. With this, `testCreateTableCommitProperties` runs against the REST catalog in every Spark version. Closes #11554 Test plan: `./gradlew :iceberg-core:test --tests 'org.apache.iceberg.rest.*'`, plus `TestCreateTable.testCreateTableCommitProperties` on Spark 3.5, 4.0, 4.1 and 4.2 for all catalogs including REST (the REST case fails without this change). --- **AI Disclosure** - Model: Claude Opus 5.5 - Platform/Tool: Claude Code - Human Oversight: [unknown - human to fill in] - Prompt Summary: Fix #11554 so REST 400 responses with type `ValidationException` are rethrown as `ValidationException`, add unit tests, and enable the skipped Spark test for the REST catalog. -- 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]
