Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

Commit

Permalink
refactor(indexer): change error to snafu
Browse files Browse the repository at this point in the history
  • Loading branch information
GMKrieger committed Jun 19, 2023
1 parent 598ea19 commit ab9f3e4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions offchain/indexer/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,12 @@ use tracing_subscriber::filter::{EnvFilter, LevelFilter};
use indexer::CLIConfig;

#[tokio::main]
async fn main() {
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let filter = EnvFilter::builder()
.with_default_directive(LevelFilter::INFO.into())
.from_env_lossy();
tracing_subscriber::fmt().with_env_filter(filter).init();

let config = CLIConfig::parse().into();
if let Err(e) = indexer::run(config).await {
tracing::error!("{:?}", e);
}
indexer::run(config).await.map_err(|e| e.into())
}

0 comments on commit ab9f3e4

Please sign in to comment.