ic-query 0.21.1

Internet Computer query library for NNS, SNS, ICRC, system canisters, and public network metadata
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Module: sns::report::neurons_cache::storage::errors
//!
//! Responsibility: build SNS neuron cache lookup failures.
//! Does not own: shared cache parsing, refresh attempts, or rendering.
//! Boundary: retains neuron-specific lookup context not shared by cache families.

use crate::sns::report::SnsHostError;
use std::path::PathBuf;

pub(super) const fn missing_id_error(id: usize, root: PathBuf) -> SnsHostError {
    SnsHostError::MissingNeuronsCacheForId { id, root }
}

pub(super) fn invalid_lookup_error(input: &str) -> SnsHostError {
    SnsHostError::InvalidLookup {
        input: input.to_string(),
    }
}