brainwires_stores/session/error.rs
1//! Typed errors surfaced by session stores.
2
3use thiserror::Error;
4
5/// Errors surfaced by session-store implementations.
6#[derive(Debug, Error)]
7pub enum SessionError {
8 /// Serialising or deserialising messages failed.
9 #[error("session serialization: {0}")]
10 Serialization(#[from] serde_json::Error),
11
12 /// Underlying storage layer (sqlite, filesystem) failed.
13 #[error("session storage: {0}")]
14 Storage(String),
15}