19 lines
569 B
Rust
19 lines
569 B
Rust
|
|
mod label;
|
||
|
|
pub use label::RelayLabelRepository;
|
||
|
|
|
||
|
|
use super::types::RelayId;
|
||
|
|
|
||
|
|
/// Errors that can occur during repository operations.
|
||
|
|
///
|
||
|
|
/// This enum provides structured error handling for all data persistence
|
||
|
|
/// operations related to relay management.
|
||
|
|
#[derive(Debug, thiserror::Error)]
|
||
|
|
pub enum RepositoryError {
|
||
|
|
/// A database operation failed with the given error message.
|
||
|
|
#[error("Database error: {0}")]
|
||
|
|
DatabaseError(String),
|
||
|
|
/// The requested relay was not found in the repository.
|
||
|
|
#[error("Relay not found: {0}")]
|
||
|
|
NotFound(RelayId),
|
||
|
|
}
|