use thiserror::Error;
use entelix_core::error::Error;
pub type QdrantStoreResult<T> = std::result::Result<T, QdrantStoreError>;
#[derive(Debug, Error)]
#[non_exhaustive]
pub enum QdrantStoreError {
#[error("qdrant transport failure: {0}")]
Transport(#[from] qdrant_client::QdrantError),
#[error("malformed qdrant response: {0}")]
Malformed(String),
#[error("configuration error: {0}")]
Config(String),
#[error("filter projection error: {0}")]
FilterProjection(String),
}
impl From<QdrantStoreError> for Error {
fn from(err: QdrantStoreError) -> Self {
match err {
QdrantStoreError::Config(msg) | QdrantStoreError::FilterProjection(msg) => {
Self::config(msg)
}
other => Self::provider_network_from(other),
}
}
}