shardline_server/error/
object_store.rs1use shardline_storage::{LocalObjectStoreError, ObjectPrefixError, S3ObjectStoreError};
2use thiserror::Error;
3
4#[derive(Debug, Error)]
6pub enum ObjectStoreError {
7 #[error("local storage operation failed")]
9 Local(#[from] LocalObjectStoreError),
10 #[error("s3 object storage adapter operation failed")]
12 S3(#[from] S3ObjectStoreError),
13 #[error("object storage prefix validation failed")]
15 Prefix(#[from] ObjectPrefixError),
16 #[error("s3 object storage configuration is missing")]
18 MissingS3Config,
19 #[error("stored object length did not match indexed metadata")]
21 StoredLengthMismatch,
22 #[error(
24 "storage migration source object hash mismatch for key {key}: expected {expected_hash}, observed {observed_hash}"
25 )]
26 MigrationSourceHashMismatch {
27 key: String,
29 expected_hash: String,
31 observed_hash: String,
33 },
34}