mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-02-17 11:53:14 +00:00
chore: better error messages
This commit is contained in:
parent
2acc388ae9
commit
c663ad1a56
@ -62,7 +62,6 @@ impl BedrockClient {
|
||||
Retry::spawn(self.backoff_strategy(), || {
|
||||
self.http_client
|
||||
.post_transaction(self.node_url.clone(), tx.clone())
|
||||
.inspect_err(|err| warn!("Transaction posting failed with error: {err:#}"))
|
||||
})
|
||||
.await
|
||||
}
|
||||
|
||||
@ -1,16 +1,18 @@
|
||||
#[derive(thiserror::Error, Debug)]
|
||||
pub enum DbError {
|
||||
#[error("RocksDb error")]
|
||||
#[error("RocksDb error: {}", additional_info.as_deref().unwrap_or("No additional info"))]
|
||||
RocksDbError {
|
||||
#[source]
|
||||
error: rocksdb::Error,
|
||||
additional_info: Option<String>,
|
||||
},
|
||||
#[error("Serialization error")]
|
||||
#[error("Serialization error: {}", additional_info.as_deref().unwrap_or("No additional info"))]
|
||||
SerializationError {
|
||||
#[source]
|
||||
error: borsh::io::Error,
|
||||
additional_info: Option<String>,
|
||||
},
|
||||
#[error("Logic Error")]
|
||||
#[error("Logic Error: {additional_info}")]
|
||||
DbInteractionError { additional_info: String },
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user