This is an automated email from the ASF dual-hosted git repository.

mgrigorov pushed a commit to branch 
avro-4170-better-error-for-wrong-block-sync-marker
in repository https://gitbox.apache.org/repos/asf/avro-rs.git

commit a3f6ccdc917fe3aada8d55a74d8e028db4c168b9
Author: Martin Tzvetanov Grigorov <[email protected]>
AuthorDate: Fri Aug 1 09:09:52 2025 +0300

    AVRO-4170: Improve sync marker error message for block reads
    
    Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
---
 avro/src/error.rs | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/avro/src/error.rs b/avro/src/error.rs
index 3e4553c..95aeb2b 100644
--- a/avro/src/error.rs
+++ b/avro/src/error.rs
@@ -483,7 +483,13 @@ pub enum Details {
     #[error("Read into buffer failed: {0}")]
     ReadIntoBuf(#[source] std::io::Error),
 
-    #[error("block marker does not match header marker")]
+    #[error(
+        "Invalid sync marker! The sync marker in the data block \
+        doesn't match the file header's sync marker. This likely \
+        indicates data corruption, truncated file, or incorrectly \
+        concatenated Avro files. Verify file integrity and ensure \
+        proper file transmission or creation."
+    )]
     GetBlockMarker,
 
     #[error("Overflow when decoding integer value")]

Reply via email to