risingwave_backup/
error.rs1use risingwave_common::error::BoxedError;
16use thiserror::Error;
17
18pub type BackupResult<T> = Result<T, BackupError>;
19
20#[derive(Error, Debug)]
21pub enum BackupError {
22 #[error("BackupStorage error: {0}")]
23 BackupStorage(
24 #[backtrace]
25 #[source]
26 BoxedError,
27 ),
28 #[error("MetaStorage error: {0}")]
29 MetaStorage(
30 #[backtrace]
31 #[source]
32 BoxedError,
33 ),
34 #[error("StateStorage error: {0}")]
35 StateStorage(
36 #[backtrace]
37 #[source]
38 BoxedError,
39 ),
40 #[error("Encoding error: {0}")]
41 Encoding(
42 #[backtrace]
43 #[source]
44 BoxedError,
45 ),
46 #[error("Decoding error: {0}")]
47 Decoding(
48 #[backtrace]
49 #[source]
50 BoxedError,
51 ),
52 #[error("Checksum mismatch: expected {expected}, found: {found}")]
53 ChecksumMismatch { expected: u64, found: u64 },
54 #[error("Meta storage is not empty before being restored")]
55 NonemptyMetaStorage,
56 #[error(transparent)]
57 Other(
58 #[from]
59 #[backtrace]
60 anyhow::Error,
61 ),
62}