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

   ### Is your feature request related to a problem or challenge?
   
   As of now, our error status type is pretty limited: 
https://github.com/apache/iceberg-rust/blob/c34982a89aa426cdb7e529f8c5c866f846bdefd1/crates/iceberg/src/error.rs#L27-L47
   And people are using `Unexpected` error status whenever they feel their 
error types don't fall into the other two categories.
   
   grpc status works pretty well based on my limited experiment (might be 
biased, so I'm happy to hear other opinions), the limited ~20 types of errors 
are able to represent almost all errors I've ever met.
   https://grpc.io/docs/guides/status-codes/
   
   Some detailed examples: 
https://github.com/apache/iceberg-rust/blob/c34982a89aa426cdb7e529f8c5c866f846bdefd1/crates/catalog/memory/src/namespace_state.rs#L34-L66
   In the above four places, `ALREADY_EXISTS` and `NOT_FOUND` are the perfect 
error status, and much clearer than merely `Unexpected`, which is `UNKNOWN` in 
terms of grpc's terminology, and is actually one of the fallback status codes.
   
   I have two proposals here:
   - Define more error types (maybe just use the grpc one), and do a sanity 
check in existing `Unexpected` error status.
     + I'm willing to work on the error status update and codebase-wise sanity 
check.
   - Add more unit tests for error status, because I think they're somewhat 
under-tested.
   
   ### Describe the solution you'd like
   
   _No response_
   
   ### Willingness to contribute
   
   I can contribute to this feature 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: 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