This is an automated email from the ASF dual-hosted git repository.
mgrigorov pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/avro-rs.git
The following commit(s) were added to refs/heads/main by this push:
new 3a0d564 AVRO-4170: Improve sync marker error message for block reads
(#249)
3a0d564 is described below
commit 3a0d564ac45c1ed3340f14d07f58cd244e0d23ca
Author: Martin Grigorov <[email protected]>
AuthorDate: Fri Aug 1 11:44:50 2025 +0300
AVRO-4170: Improve sync marker error message for block reads (#249)
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")]