global: improve errors

This commit is contained in:
nym21
2025-12-16 20:49:19 +01:00
parent 3ca83a2289
commit 1ad8d8a631
36 changed files with 232 additions and 334 deletions

View File

@@ -8,10 +8,14 @@
#![allow(dead_code)]
use brk_error::Result;
use brk_types::{BlockFeeRatesEntry, FeeRatePercentiles, TimePeriod};
use vecdb::{IterableVec, VecIndex};
use brk_types::{
BlockFeeRatesEntry,
// FeeRatePercentiles,
TimePeriod,
};
// use vecdb::{IterableVec, VecIndex};
use super::dateindex_iter::DateIndexIter;
// use super::dateindex_iter::DateIndexIter;
use crate::Query;
impl Query {

View File

@@ -98,7 +98,7 @@ impl Query {
.pools
.vecs
.get(&slug)
.ok_or_else(|| Error::Str("Pool data not found"))?;
.ok_or_else(|| Error::NotFound("Pool data not found".into()))?;
let mut cumulative = pool_vecs
.indexes_to_blocks_mined