use std::sync::PoisonError; use thiserror::Error; /// Errors related to communication with the store. #[derive(Debug, Error)] pub enum Error { #[error("invalid request: {0}")] InvalidRequest(String), #[error("internal storage error: {0}")] StorageError(String), } impl From> for Error { fn from(value: PoisonError) -> Self { Error::StorageError(value.to_string()) } }