use shardline_storage::{LocalObjectStoreError, ObjectPrefixError, S3ObjectStoreError};
use thiserror::Error;
#[derive(Debug, Error)]
pub enum ObjectStoreError {
#[error("local storage operation failed")]
Local(#[from] LocalObjectStoreError),
#[error("s3 object storage adapter operation failed")]
S3(#[from] S3ObjectStoreError),
#[error("object storage prefix validation failed")]
Prefix(#[from] ObjectPrefixError),
#[error("s3 object storage configuration is missing")]
MissingS3Config,
#[error("stored object length did not match indexed metadata")]
StoredLengthMismatch,
#[error(
"storage migration source object hash mismatch for key {key}: expected {expected_hash}, observed {observed_hash}"
)]
MigrationSourceHashMismatch {
key: String,
expected_hash: String,
observed_hash: String,
},
}