connortsui20 commented on issue #1038:
URL: https://github.com/apache/iceberg-rust/issues/1038#issuecomment-2718275816
> Adding a separate error type for the catalog doesn't make it easier for
users; instead, it adds more work on their end.
>
> At this stage, I think it would be good to have `ErrorKind::TableNotFound`
and `ErrorKind::NamespaceExists`. Users can easily handle these errors and
obtain detailed information from the error message or context.
Sorry I should have been clear, I meant that there could be a dedicated
Catalog error kind that could be a variant of `ErrorKind`. For example:
```rust
pub enum ErrorKind {
Unexpected,
Catalog(CatalogErrorKind),
DataInvalid,
FeatureUnsupported,
}
pub enum CatalogErrorKind {
NoSuchNamespace,
NoSuchTable,
NamespaceAlreadyExists,
TableAlreadyExists,
}
```
There's also potentially a `NamespaceNotEmpty` variant under
`CatalogErrorKind` that should be there, see
https://github.com/apache/iceberg/issues/12502
And once table update is implemented, there should be `CommitFailed` and
`CommitStateUnknown` variants.
--
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]