// Generated by Qleany v1.4.8 from error.tera
use thiserror::Error;
use crate::types::EntityId;
/// Errors that can occur in the repository / table layer.
#[derive(Debug, Error)]
pub enum RepositoryError {
/// An entity with the given id already exists.
#[error("{entity} id {id} already in use")]
DuplicateId { entity: &'static str, id: EntityId },
/// A relationship target does not exist.
#[error("{operation}: child entities do not exist: {ids:?}")]
MissingRelationshipTarget {
operation: &'static str,
ids: Vec<EntityId>,
},
/// Serialization / deserialization failed.
#[error("serialization error: {0}")]
Serialization(String),
}