clesaec commented on code in PR #2587:
URL: https://github.com/apache/avro/pull/2587#discussion_r1396856210


##########
lang/rust/avro/src/error.rs:
##########
@@ -478,6 +478,9 @@ pub enum Error {
 
     #[error("Invalid Avro data! Cannot read codec type from value that is not 
Value::Bytes.")]
     BadCodecMetadata,
+
+    #[error("Schemas are not compatible. '{0}'")]
+    CompatibilityError(String),

Review Comment:
   Currently, AvroResult is defined as
   ```rust
   pub type AvroResult<T> = Result<T, Error>;
   ```
   with Error as this Enum, so you can't derive.
   Would be possible with
   ```rust
   #[derive(thiserror::Error, Debug)]
   pub enum CompatibilityError {
   ```
   But, then, you could not build an AvroResult (until AvroResult is redefined 
as  `Result<T, thiserror::Error>`, but i don't know what would be other 
consequences
   WDYT @martin-g ?
   



-- 
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]

Reply via email to