connortsui20 opened a new issue, #1038:
URL: https://github.com/apache/iceberg-rust/issues/1038

   ### Is your feature request related to a problem or challenge?
   
   As of now, `ErrorKind` looks like this (doc comments removed):
   
   ```rust
   pub enum ErrorKind {
       Unexpected,
       DataInvalid,
       FeatureUnsupported,
   }
   ```
   
   This is pretty bare, especially since there are whole classes of things that 
can go wrong with respect to the Iceberg `Catalog` trait. See #965 and this 
[comment](https://github.com/apache/iceberg-rust/pull/965#discussion_r1977531978)
 for some context for this specific repo, as well as the official [REST API 
specification](https://github.com/apache/iceberg/blob/main/open-api/rest-catalog-open-api.yaml).
 
   
   It would be nice if there was a dedicated error type for `Catalog` errors. 
Some simple things that could be added are variants for tables or namespaces 
that don't exist, or duplicate tables or namespaces. There are many other 
things that can go wrong. Right now #965 just uses string messages to represent 
those errors, which is not ideal.
   
   Adding dedicated error types would also mean the different implementations 
of the Iceberg Catalog could be more easily unified: the exact return behavior 
of each method would be the same among every implementation (instead of having 
a different error message depending on which implementation you choose).
   
   ### Describe the solution you'd like
   
   I think there are many ways to do this, some better than others. I would say 
that the current method manually implementing error messages, backtrace, and 
variants is somewhat shaky. Personally, I think that adding `thiserror` or 
`snafu` as a dependency for this would ease development going forward, not just 
the error types specified above (for the catalog) but for any other error kinds 
that Iceberg needs / may introduce.
   
   ### Willingness to contribute
   
   - [ ] I can contribute to this feature independently
   - [x] I would be willing to contribute to this feature with guidance from 
the Iceberg Rust community
   - [ ] I cannot contribute to this feature at this time


-- 
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-unsubscr...@iceberg.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to