From a3f6ccdc917fe3aada8d55a74d8e028db4c168b9 Mon Sep 17 00:00:00 2001 From: Martin Tzvetanov Grigorov Date: Fri, 1 Aug 2025 09:09:52 +0300 Subject: [PATCH] AVRO-4170: Improve sync marker error message for block reads Signed-off-by: Martin Tzvetanov Grigorov --- 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 3e4553c4..95aeb2b9 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")]