From bbb84cd849792f0dff02608597385f6c9bdbb554 Mon Sep 17 00:00:00 2001 From: Rostyslav Tyshko Date: Wed, 9 Apr 2025 01:30:10 -0400 Subject: [PATCH] add new type of error, since we have a new interaction --- common/src/lib.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/common/src/lib.rs b/common/src/lib.rs index 2049ae6..16ff638 100644 --- a/common/src/lib.rs +++ b/common/src/lib.rs @@ -40,6 +40,8 @@ impl From for SequencerClientError { pub enum ExecutionFailureKind { #[error("Failed to write into builder err: {0:?}")] WriteError(anyhow::Error), + #[error("Failed to interact with a db err: {0:?}")] + DBError(anyhow::Error), #[error("Failed to build builder err: {0:?}")] BuilderError(anyhow::Error), #[error("Failed prove execution err: {0:?}")] @@ -70,4 +72,8 @@ impl ExecutionFailureKind { pub fn prove_error(err: anyhow::Error) -> Self { Self::ProveError(err) } + + pub fn db_error(err: anyhow::Error) -> Self { + Self::DBError(err) + } }