blob_indexer/indexer/
error.rs

1use crate::{
2    clients::{beacon::types::BlockIdResolutionError, common::ClientError},
3    indexer::tasks::sse_indexing::SSEIndexingError,
4    synchronizer::error::SynchronizerError,
5};
6
7#[derive(Debug, thiserror::Error)]
8pub enum IndexerError {
9    #[error("failed to retrieve blobscan's sync state")]
10    IndexerStateRetrievalError(#[from] ClientError),
11    #[error("task \"{task_name}\" failed: {error}")]
12    IndexingTaskError {
13        task_name: String,
14        error: IndexerTaskError,
15    },
16    #[error(transparent)]
17    SynchronizerError(#[from] SynchronizerError),
18    #[error(transparent)]
19    BlockIdResolutionFailed(#[from] BlockIdResolutionError),
20}
21
22#[derive(Debug, thiserror::Error)]
23pub enum IndexerTaskError {
24    #[error(transparent)]
25    SSEIndexingError(#[from] SSEIndexingError),
26    #[error(transparent)]
27    SynchronizerError(#[from] SynchronizerError),
28}