CTTY commented on code in PR #1919:
URL: https://github.com/apache/iceberg-rust/pull/1919#discussion_r2609188015
##########
crates/iceberg/src/error.rs:
##########
@@ -63,6 +63,47 @@ pub enum ErrorKind {
/// Catalog commit failed due to outdated metadata
CatalogCommitConflicts,
+
+ /// Catalog commit state is unknown after a server error.
+ ///
+ /// This error is returned when a commit operation receives a 5xx response,
+ /// indicating the server failed but the commit state is uncertain.
+ CommitStateUnknown,
+
+ /// Namespace is not empty and cannot be dropped.
+ ///
+ /// This error is returned when attempting to drop a namespace that still
+ /// contains tables or other resources.
+ NamespaceNotEmpty,
+
+ /// Iceberg view does not exist.
+ ViewNotFound,
+
+ /// Iceberg view already exists at creation.
+ ViewAlreadyExists,
+
+ /// Service is temporarily unavailable.
+ ///
+ /// This error is returned when the server returns a 503 Service
Unavailable status.
+ ServiceUnavailable,
+
+ /// Bad request.
+ ///
+ /// This error is returned when the server returns a 400 Bad Request
status,
+ /// indicating a malformed or invalid request.
+ BadRequest,
+
+ /// Forbidden.
+ ///
+ /// This error is returned when the server returns a 403 Forbidden status,
+ /// indicating the client does not have permission to perform the
operation.
+ Forbidden,
+
+ /// Not authorized.
+ ///
+ /// This error is returned when the server returns a 401 Unauthorized
status,
+ /// indicating the client is not authenticated.
+ NotAuthorized,
Review Comment:
I do like this direction of expanding the error kinds but I feel like this
will need more discussion. Imo something like the `IoErrorKind` mentioned
[here](https://github.com/apache/iceberg-rust/pull/1885#discussion_r2559571358)
would be cleaner
--
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]