Skip to content

Commit

Permalink
fix(indexer): correct parsing error in indexer output by id (#481)
Browse files Browse the repository at this point in the history
* Correct handling of parsing error in indexer output by id

* fmt
  • Loading branch information
Alexandcoats authored Jul 28, 2022
1 parent 0adfaa0 commit eb212ec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bin/inx-chronicle/src/api/stardust/indexer/routes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use super::{
extractors::IndexedOutputsPagination,
responses::{IndexerOutputResponse, IndexerOutputsResponse},
};
use crate::api::{stardust::indexer::extractors::IndexedOutputsCursor, ApiError, ApiResult};
use crate::api::{error::ParseError, stardust::indexer::extractors::IndexedOutputsCursor, ApiError, ApiResult};

pub fn routes() -> Router {
Router::new().nest(
Expand Down Expand Up @@ -51,9 +51,9 @@ async fn indexed_output_by_id<ID>(
) -> ApiResult<IndexerOutputResponse>
where
ID: Into<IndexedId> + FromStr,
ApiError: From<ID::Err>,
ParseError: From<ID::Err>,
{
let id = ID::from_str(&id)?;
let id = ID::from_str(&id).map_err(ApiError::bad_parse)?;
let res = database
.get_indexed_output_by_id(id)
.await?
Expand Down

0 comments on commit eb212ec

Please sign in to comment.