marvinlanhenke commented on code in PR #304: URL: https://github.com/apache/iceberg-rust/pull/304#discussion_r1539132507
########## crates/catalog/glue/src/error.rs: ########## @@ -15,15 +15,13 @@ // specific language governing permissions and limitations // under the License. -//! Iceberg Glue Catalog implementation. - use anyhow::anyhow; use std::fmt::Debug; use iceberg::{Error, ErrorKind}; /// Format AWS SDK error into iceberg error -pub fn from_aws_error<T>(error: aws_sdk_glue::error::SdkError<T>) -> Error +pub fn from_sdk_error<T>(error: aws_sdk_glue::error::SdkError<T>) -> Error Review Comment: you mean something like: ```rust impl<T: Debug> From<aws_sdk_glue::error::SdkError<T>> for Error { fn from(value: aws_sdk_glue::error::SdkError<T>) -> Self { Error::new( ErrorKind::Unexpected, "Operation failed for hitting aws skd error".to_string(), ) .with_source(anyhow!("aws sdk error: {:?}", error)) } } ``` ...however, this does not work: error[E0117]: only traits defined in the current crate can be implemented for types defined outside of the crate But, I'm guessing there is another way? -- 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 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