Files
Synapse/crates/synapse-history/src/error.rs
T
dasemuandClaude Sonnet 5.5 3ab03777ea feat(history): git-based snapshots, page history and restore
Deterministic Logseq-compatible Markdown export committed to a bare gix
repository, incremental snapshots driven by the op log, snapshot policy,
page history/diff, restore through the Graph API and pure-Rust HTTP push.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-21 03:36:59 +02:00

26 lines
597 B
Rust

use thiserror::Error;
#[derive(Debug, Error)]
pub enum Error {
#[error("core: {0}")]
Core(#[from] synapse_core::Error),
#[error("sqlite: {0}")]
Sqlite(#[from] rusqlite::Error),
#[error("io: {0}")]
Io(#[from] std::io::Error),
#[error("json: {0}")]
Json(#[from] serde_json::Error),
#[error("git: {0}")]
Git(String),
#[error("not found: {0}")]
NotFound(String),
#[error("push: {0}")]
Push(String),
}
pub type Result<T> = std::result::Result<T, Error>;
pub(crate) fn git<E: std::fmt::Display>(e: E) -> Error {
Error::Git(e.to_string())
}