You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "dannycjones (via GitHub)" <gi...@apache.org> on 2026/06/05 17:47:49 UTC
[PR] fix(s3tables): add TableNotFound error handling [iceberg-rust]
dannycjones opened a new pull request, #2595:
URL: https://github.com/apache/iceberg-rust/pull/2595
## Which issue does this PR close?
- Closes #2594.
## What changes are included in this PR?
This PR updates table loading in the S3 Tables catalog to first check for a table not found error from the S3 Tables service, before allowing the fallback mapping of SDK error into an Iceberg `Unexpected` error.
## Are these changes tested?
Yes, I've added and run new integration tests.
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] fix(s3tables): add TableNotFound error handling [iceberg-rust]
Posted by "CTTY (via GitHub)" <gi...@apache.org>.
CTTY merged PR #2595:
URL: https://github.com/apache/iceberg-rust/pull/2595
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] fix(s3tables): add TableNotFound error handling [iceberg-rust]
Posted by "dannycjones (via GitHub)" <gi...@apache.org>.
dannycjones commented on code in PR #2595:
URL: https://github.com/apache/iceberg-rust/pull/2595#discussion_r3380862245
##########
crates/catalog/s3tables/src/catalog.rs:
##########
@@ -240,7 +240,21 @@ impl S3TablesCatalog {
.table_bucket_arn(self.config.table_bucket_arn.clone())
.namespace(table_ident.namespace().to_url_string())
.name(table_ident.name());
- let resp: GetTableOutput = req.send().await.map_err(from_aws_sdk_error)?;
+
+ let resp = req.send().await.map_err(|err| {
+ if err
+ .as_service_error()
+ .is_some_and(GetTableError::is_not_found_exception)
+ {
+ Error::new(
+ ErrorKind::TableNotFound,
Review Comment:
Even the response body (which I wouldn't recommend to rely on) doesn't specify.
This is the JSON response for a non-existent namespace.
```json
{"message":"The specified table does not exist."}
```
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] fix(s3tables): add TableNotFound error handling [iceberg-rust]
Posted by "Kurtiscwright (via GitHub)" <gi...@apache.org>.
Kurtiscwright commented on PR #2595:
URL: https://github.com/apache/iceberg-rust/pull/2595#issuecomment-4653850227
@CTTY the PR looks good can we merge this?
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] fix(s3tables): add TableNotFound error handling [iceberg-rust]
Posted by "dannycjones (via GitHub)" <gi...@apache.org>.
dannycjones commented on code in PR #2595:
URL: https://github.com/apache/iceberg-rust/pull/2595#discussion_r3387801328
##########
crates/catalog/s3tables/src/catalog.rs:
##########
@@ -240,7 +240,21 @@ impl S3TablesCatalog {
.table_bucket_arn(self.config.table_bucket_arn.clone())
.namespace(table_ident.namespace().to_url_string())
.name(table_ident.name());
- let resp: GetTableOutput = req.send().await.map_err(from_aws_sdk_error)?;
+
+ let resp = req.send().await.map_err(|err| {
+ if err
+ .as_service_error()
+ .is_some_and(GetTableError::is_not_found_exception)
+ {
+ Error::new(
+ ErrorKind::TableNotFound,
Review Comment:
Sounds good. I've also updated the error message itself to include this, so when this error is thrown there is a hint to the user.
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] fix(s3tables): add TableNotFound error handling [iceberg-rust]
Posted by "dannycjones (via GitHub)" <gi...@apache.org>.
dannycjones commented on code in PR #2595:
URL: https://github.com/apache/iceberg-rust/pull/2595#discussion_r3380836142
##########
crates/catalog/s3tables/src/catalog.rs:
##########
@@ -240,7 +240,21 @@ impl S3TablesCatalog {
.table_bucket_arn(self.config.table_bucket_arn.clone())
.namespace(table_ident.namespace().to_url_string())
.name(table_ident.name());
- let resp: GetTableOutput = req.send().await.map_err(from_aws_sdk_error)?;
+
+ let resp = req.send().await.map_err(|err| {
+ if err
+ .as_service_error()
+ .is_some_and(GetTableError::is_not_found_exception)
+ {
+ Error::new(
+ ErrorKind::TableNotFound,
Review Comment:
From what I can tell, no. I had looked into this, I should have mentioned :)
Here's the error list, it is only as granular as "Resource not found" and does not clarify if it was the table or namespace.
https://docs.aws.amazon.com/AmazonS3/latest/API/API_s3Buckets_GetTable.html#API_s3Buckets_GetTable_Errors
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] fix(s3tables): add TableNotFound error handling [iceberg-rust]
Posted by "CTTY (via GitHub)" <gi...@apache.org>.
CTTY commented on code in PR #2595:
URL: https://github.com/apache/iceberg-rust/pull/2595#discussion_r3383819234
##########
crates/catalog/s3tables/src/catalog.rs:
##########
@@ -240,7 +240,21 @@ impl S3TablesCatalog {
.table_bucket_arn(self.config.table_bucket_arn.clone())
.namespace(table_ident.namespace().to_url_string())
.name(table_ident.name());
- let resp: GetTableOutput = req.send().await.map_err(from_aws_sdk_error)?;
+
+ let resp = req.send().await.map_err(|err| {
+ if err
+ .as_service_error()
+ .is_some_and(GetTableError::is_not_found_exception)
+ {
+ Error::new(
+ ErrorKind::TableNotFound,
Review Comment:
we should add a comment to explain this, that S3Tables currently only supports "Resource not found". if a namespace is not found, it would also be resolved to `TableNotFound`
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] fix(s3tables): add TableNotFound error handling [iceberg-rust]
Posted by "CTTY (via GitHub)" <gi...@apache.org>.
CTTY commented on code in PR #2595:
URL: https://github.com/apache/iceberg-rust/pull/2595#discussion_r3376991640
##########
crates/catalog/s3tables/src/catalog.rs:
##########
@@ -240,7 +240,21 @@ impl S3TablesCatalog {
.table_bucket_arn(self.config.table_bucket_arn.clone())
.namespace(table_ident.namespace().to_url_string())
.name(table_ident.name());
- let resp: GetTableOutput = req.send().await.map_err(from_aws_sdk_error)?;
+
+ let resp = req.send().await.map_err(|err| {
+ if err
+ .as_service_error()
+ .is_some_and(GetTableError::is_not_found_exception)
+ {
+ Error::new(
+ ErrorKind::TableNotFound,
Review Comment:
Is there a way to tell `NamespaceNotFound` from `TableNotFound` in `GetTableError`?
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] fix(s3tables): add TableNotFound error handling [iceberg-rust]
Posted by "dannycjones (via GitHub)" <gi...@apache.org>.
dannycjones commented on PR #2595:
URL: https://github.com/apache/iceberg-rust/pull/2595#issuecomment-4634057452
@Kurtiscwright would you be able to take a look at this one?
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org